Conditional Formatting and If Then Statements

  • Thread starter Thread starter bullandbear1987
  • Start date Start date
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?
 
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!).
 
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!
==============================================
 

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

Back
Top