+ Reply to Thread
Results 1 to 6 of 6

Copy conditional formatting formula to other cells without changing VLOOKUP reference

  1. #1
    Registered User
    Join Date
    08-17-2011
    Location
    aldershot, England
    MS-Off Ver
    Excel 2002
    Posts
    9

    Copy conditional formatting formula to other cells without changing VLOOKUP reference

    Hi

    I'm trying to copy a conditional formatting formula to other cells in my table however when I paint or copy and paste the reference for my look up table is changed - how can I stop this from happening?

    Eg formatting in cell F3
    =VLOOKUP(F3,A3:B23,2,FALSE)>VLOOKUP(E3,A3:B23,2,FALSE)

    Formatting in cell F4
    =VLOOKUP(F4,A3:B24,2,FALSE)>VLOOKUP(E4,A3:B24,2,FALSE)

    Each time I copy down the A3:B23 changes to A4:B24 and so on... how do I prevent this?

    Thanks
    Last edited by suzy_f; 08-19-2011 at 07:40 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Copy conditional formatting formula to other cells without changing VLOOKUP refer

    Hi

    Make your lookup range Absolute with the $ signs

    =VLOOKUP(F3,$A$3$B$23,2,FALSE)>VLOOKUP(E3,$A$3:$B$23,2,FALSE)
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Copy conditional formatting formula to other cells without changing VLOOKUP refer

    Try with a $-sign in the references to the table:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-17-2011
    Location
    aldershot, England
    MS-Off Ver
    Excel 2002
    Posts
    9

    Re: Copy conditional formatting formula to other cells without changing VLOOKUP refer

    Thanks so much That's worked!

    Final Question - I would now like to have a column that counts the number of green / orange / red squares in my table for each row (the colours are determined by the conditional formatting)

    How would I do this?

  5. #5
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Copy conditional formatting formula to other cells without changing VLOOKUP refer

    Quote Originally Posted by suzy_f View Post
    Thanks so much That's worked!

    Final Question - I would now like to have a column that counts the number of green / orange / red squares in my table for each row (the colours are determined by the conditional formatting)

    How would I do this?
    Hi Suzy

    Without VBA, you cannot count the colours.
    However, what you need to do is to count the cells that match the criteria you have set in order to create the colours.

    It would be easier if you could upload a copy of your workbook

  6. #6
    Registered User
    Join Date
    08-17-2011
    Location
    aldershot, England
    MS-Off Ver
    Excel 2002
    Posts
    9

    Re: Copy conditional formatting formula to other cells without changing VLOOKUP refer

    How do I mark the thread as resolved as my question was answered? (I thought my second question would fit better in a new thread as it's a new topic).
    Attached Files Attached Files
    Last edited by suzy_f; 08-18-2011 at 06:04 AM.

+ 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