comparing cells - how?

N

Nooby

I need to compare two cells and color them if different, but not
compare spaces.
I've tried the following:

Conditional formating:
=B10<>C10 // But it compares spaces

Formula:
=IF(C10<>B10,"","Different") // But it will compare spaces and I don't
know how to make it color fill C10 & B10

=exact(C10,B10) // But it will compare spaces and I don't know how to
make it color fill C10 & B10 when false

I'm afraid I am way over my head in this. Is there a way to move the
contents of a cell to a buffer,
remove spaces, make it all the same case, then compare to another?
Does anyone have a macro that already does this?

Any help at all would be greatly appreciated before I pull out the few
brown hairs I have left!!
 
N

Nooby

I appreciate your help, and it adds to my limited knowledge, but that
formula still does not ignore spaces.
I need the following to be equal: "word" and "wo rd" and "WORD" and
"word"
but not "word" and "wordx"
I added your formula to the conditional formatting.That is where it
goes, right? Maybe it just needs tweaking?
 
N

Nooby

OK. how? Do I add the substitue as formula 1 and the AND as formula 2
to conditional formatting?
 
A

Ardus Petus

No, you enter the following formula as formula 1
=SUBSTITUTE(B10," ","")<>SUBSTITUTE(C10," ","")

If true (B1=C1, skipping spaces) the formatting takes place
 
N

Nooby

You are a life saver.
Someone told me I would have to write a macro that moved the cells
elsewhere...strip chars, compare, and so on.
Excel is so powerful.
Again, Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top