Conditional Formatting and If Then Statements

B

bullandbear1987

I have a set of #'s in Column A.
I have a set of #'s in Column B.

What would be the formula I could set in Column B using conditional
formatting, so that it compares ALL the values from Column A and
highlights any # that matches in Column B?
 
D

Dave Peterson

You could use a couple of different formulas:

Select your range in column A.
I had A1 the activecell when I did this.

Format|conditional formatting
formula is: =isnumber(match(a1,b:b,0))

I could also use a formula like:
=COUNTIF(B:B,A1)>0
to accomplish the same thing.

Personally, I'd use an additional column (C?) and put the formula in that
column. Then I could use all the excel tools (data|filter|autofilter) to see
the results.

Format|conditional formatting looks very pretty, but you can't really do things
based on this kind of formatting (well, except look at it!).
 
R

RagDyer

Select all of Column B, then:

<Format> <ConditionalFormat>,

Click on "Formula Is", and enter this:

=COUNTIF(A:A,B1)

Click on <Format>, and choose whatever you wish,
Then <OK> <OK>.

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
Top