+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting Offset

  1. #1
    Registered User
    Join Date
    09-02-2012
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Conditional Formatting Offset

    In the attached file I would like to highlight all Stores in the selected (via the UserForm) Manager's Region. I can't seem to figure out how to highlight one column to the right of the value returned by VLookup.

    Thank you.
    Attached Files Attached Files
    Last edited by tommy_m; 09-16-2012 at 04:56 PM. Reason: Solved: http://www.excelforum.com/excel-programming-vba-macros/860789-conditional-formatting-offset.html?p=2934401&viewfull=1#post2934401

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Conditional Formatting Offset

    Hi, tommy_m,

    if you compare the Value of say B3 to South you will find no match. So you need to change the Conditional Formatting from Cell Value to Expression:

    Please Login or Register  to view this content.
    You might even think about using different colour codes for the managers, i.e.
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-02-2012
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional Formatting Offset

    Holger,

    Thank you for your reply. This worked perfectly in Excel 2010, but does not highlight anything in Excel 2003. I tried manually defining the ranges, but it did not have the intended effect. The attached file has a few more tables to more accurately represent what I'm working with.

    - Tommy
    Attached Files Attached Files

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Conditional Formatting Offset

    Hi, Tommy,

    ...but does not highlight anything in Excel 2003
    If you change a code that works please take care that you copy all relevant parts (you missed the assignment of the cells as being absolute in column, and I usually work with multiple areas a little bit different):

    Your code:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Tested in Excel 2000 - but I would break down the single areas as otherwise only the value in Column A is taken for to colour the cells but not the value in the column next to the colour. This would mean work with a loop for the three areas instead of marking one great area. Can you do that on your own?

    Ciao,
    Holger
    Last edited by HaHoBe; 09-16-2012 at 03:10 PM. Reason: just realized the need of a loop for correct output, changes in italic

  5. #5
    Registered User
    Join Date
    09-02-2012
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional Formatting Offset

    Holger,

    Thank you very much for your help on this! The following code accomplishes what I set out to do:
    Please Login or Register  to view this content.
    I assume there is a more elegant way to accomplish this, but the above code is functional and I'm happy with that!

    - Tommy
    Attached Files Attached Files

+ 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