Comparing Two Cells in Excel

S

Shawn

Example:
A B C
windsor | tecumseh | |

I want to compare A and B, but only the first 4 letters, if the same
do nothing but if not the same change the blank cell "C" to a
different color or something that i can notice which ones are not the
same.

Thanks
 
J

JulieD

Hi Shawn

this can be done using conditional formatting
click in cell C1
choose format / conditional formatting
choose formula is
type
=LEFT(A1,4)<>LEFT(B1,4)
click on format
click on Patterns
choose an obvious colour
OK
OK
copy down as needed

Cheers
JulieD
 
T

Tom Ogilvy

select C1 to C10 (as an example) with C1 the active cell

Do
Format=>Conditional formatting and change

Cell Value is to Formula is

then put in this formula

=left($A1,4)<>Left($B1,4)

then click the format button and choose the pattern tab - select a color

OK out of the dialogs.
 
S

SidBord

You really don't need column "C" as an indicator, but
that's up to you. Use conditional formatting. Write a
formula like this in the conditional formatting dialog box:
=Left(CellAAddr,4)<>Left(CellBAddr,4)

Then set the format to change the background (fill) color
of the cell to red and the font color to bold black. Write
a conditional format for each cell.
-OR-
Use column "C" for the indicator, and write a conditional
format for just that cell using the same coding as I showed
above. In this case you can change the color of just the
column "C" fill. No need to change the font color. I do
this for error detection all the time.
 
Top