Format if cell partially matches another - excel

I have two columns with telephone numbers in them, I want cells B2 and B3 to change colour depending on whether they match the last 4 digits in the column next to them:
B2 turns green as it matches the end of A2 and B3 turns red as it does not match the last four digits of A3.
How would I go about doing this?

I suggest you just use one rule, say format all red and use the CF to change that to green only when there is a match, say with:
=B1=VALUE(RIGHT(A1,4))
in B1 and applied to B:B.

Related

Conditional cell for incorrect value excluding blanks

Trying to define a conditional cell that highlights the value in A1 when that value is not equal to the sum of values in B1 and C1, but excluding when B1 and/or C1 is blank
In the mockup below, only A3 should be highlighted.
I have tried with numerous formulas, none of which works correctly:
=SUMIF(B1:C1,"<>",B1:C1)
=IF(OR(ISBLANK(B1),ISBLANK(C1)),"",B1:C1)
=SUM(IF(COUNTBLANK(B1:C1),"",SUM(B1:C1))B1:C1)
Many thanks for indicating my error!
You want to highlight A only when B and C are not blank and A is not equal to B+C so something like AND(B1<>"",C1<>"",A1<>B1+C1) should work for you

Excel - Formula To Find Match On List of Keywords?

If I have colors going from cells B1-B6 (Red, Orange, Yellow, Green,Blue,Purple)
And then a sentence/string in cell A1 - (There was a orange box).
I want a formula in cell C1 where if there is a match on any of the keywords, that is should spit out the keyword it matched. Attached is a screenshot example.
I would also want this formula in C1 to be able to drag down and have it "auto-fill". So that if I put any sentence in cell A2, it should repeat the formula in C1, but for this new cell of A2 automatically.
Use the formula:
=XLOOKUP(1,--ISNUMBER(SEARCH(B1:B6,A1)),B1:B6,"no match",2) in the "C" Column.
it will work!

How to retain A1 Notation in Excel fill after being dragged down for every row?

How do I retain the value of A1 Notation after I drag it down to copy the formula to other rows?
For example, I have 2 columns, A and B, and let's say 10 rows, 1-10
And the formula is =(A1)&"randomtexts"
I want the basic A1 notation (I'm not sure what it's called, please let me know what) and make it fixed in that formula so that it wont become A2, A3, A4, etc.. down the line?
I need it to be fixed A1, for this specific problem. Is there a word I can add to indicate it should always be A1 (or any specified cell) and not change it automatically?
Use the $ like:
=A$1 & "whatever"
when copied downward the 1 will not advance to 2, 3, etc.
(by the way, it is called "A1" notation)

Excel: Format cells if it finds similar strings in cells

Given the example:
A1: Smith, John Michael
A2: John Michael Smith
What is the formula if I want to format cells (let's say color the cells green) when it finds the string "Smith" in both A1 and A2?
A1 -> list from excel file
A2 -> list from database
I'm comparing a list of names extracted from a user database and the list of names on an Excel file to see if which ones are missing in the database.
Assume you place the word you are looking for in A4, you could use the following formula:
=AND(ISNUMBER(SEARCH(A4,A1)),ISNUMBER(SEARCH(A4,A2)),NOT(TRIM(CLEAN(A4))=""))
Search will look for the text entered in cell A4 and see if it can be found in A1. If it is found it will return a number and if is not found it will return an error.
Isnumber checks to see if the search returned a number. if search found the word entered in A4 in A1, it will return the number of the starting position and is number will then return a value of TRUE.
The process is then repeated for the text in A2.
In order to say that the text is found in both locations you need all arguments in the AND formula to be TRUE. if any one of them is false AND will return a value of FALSE.
The final step will be to apply conditional formatting to the cells. Use formula as your method for your conditional formula control and use the above formula in the space provided. Set your special format for when your formula returns a true value.
Depending on how you apply your conditional formatting, you may want to use $A$4 instead of A4. Same goes for A1 and A2.
The last logical check that was added was to make sure that if no information was entered in A4, or a space was entered in A4 that the check would colour the cells. In other words it will only colour the cells if there is actually something to look for in A4.

How to merge two cells, add a space and a comma

I have two cells:
Cell 1 - Toronto
Cell 2 - ON
I want to merge into one cell and have it say Toronto, ON (adding a , and space after Toronto).
Assuming Cell 1 is A1 and Cell 2 is B1, please try:
=A1&", "&B1
I think you want to CONCATENATE rather than merge (which is best avoided at all costs).
An alternative version is:
=CONCATENATE(A1,", ",B1)

Resources