+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP in Conditional Formatting

  1. #1
    Registered User
    Join Date
    08-04-2006
    Posts
    55

    Exclamation VLOOKUP in Conditional Formatting

    Hi All

    I have a formula I want to use in conditional formatting, which is:

    =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)

    I want to be able to then drag this formula down so that it applies to the rest of the row. Values would then be red if the result is true. The problem I have is that although B7 and I7 are not absolute references, they do not update as you drag down the formula.

    So in row 8, the formula still reads:

    =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)

    when i would like it to read:

    =IF(VLOOKUP(B8,$C$38:$D$99,2,0)<>I8,1,0)

    Can anyone help me get around this? I have tried using define name for the vlookup formula but that still treats the cell references as absolute.

    Thanks everyone!

    Brokovich.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    To copy conditional formatting conditions, use the Format Painter ...
    HTH
    Carim


    Top Excel Links

  3. #3
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    Thanks Carim, but I have tried that. The problem is the references do not change, as explained.

    Thanks anyway.

    Brokovich.

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Sorry ... but the Format Painter is the icon which looks like a yellow paint brush, it is used to copy formats only - not contents ... and it does copy relative references in a conditional format formula ...
    Give it a try ...

  5. #5
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    Yes, it does copy the formula down, but it copies it exactly as it is on the previous cell. It copies as:

    Row 7 =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)
    Row 8 =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)
    Row 9 =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)

    What i want it to do is copy like this:

    Row 7 =IF(VLOOKUP(B7,$C$38:$D$99,2,0)<>I7,1,0)
    Row 8 =IF(VLOOKUP(B8,$C$38:$D$99,2,0)<>I8,1,0)
    Row 9 =IF(VLOOKUP(B9,$C$38:$D$99,2,0)<>I9,1,0)

    If you try it you will see it doesn't work.

    Brokovich.

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Sorry to report I just tried... and it works fine ...

    Do you mind uploading a zipped copy of your file ...?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1