+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting usng Two Columns Header

  1. #1
    Registered User
    Join Date
    02-12-2020
    Location
    Brisbane
    MS-Off Ver
    365
    Posts
    36

    Conditional Formatting usng Two Columns Header

    Hi,
    I have 1 sheet with a range, for example, from A1 to D4. I wish to create a VBA code for conditional formatting:
    Highlight any value in Garage (column D) if:
    - the Location (column A) is D
    - and the Garage (column D) is NOT between 6 and 10

    I created the following code, but unsuccessful. Can anyone help me to find what is not correct?

    In column D, I use header name as a reference. How do I do the same for column A?

    Thank you very much. I also attached the sheet as an example.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Conditional Formatting usng Two Columns Header

    Please Login or Register  to view this content.
    Last edited by sintek; 11-04-2020 at 05:36 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    02-12-2020
    Location
    Brisbane
    MS-Off Ver
    365
    Posts
    36

    Re: Conditional Formatting usng Two Columns Header

    Hi Sintek,
    My apology for the late response.
    Much appreciated your assistance. It works!

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Conditional Formatting usng Two Columns Header

    Glad I could contribute...tx for rep +

  5. #5
    Registered User
    Join Date
    02-12-2020
    Location
    Brisbane
    MS-Off Ver
    365
    Posts
    36

    Re: Conditional Formatting usng Two Columns Header

    Sintek,
    Suppose I want to use R1C1 style by referring to the header names.
    I was trying to write a code below, but unsuccessful.
    Can you point me to errors I made? Or it all mess up?

    Thank you.







    Please Login or Register  to view this content.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Conditional Formatting usng Two Columns Header

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-12-2020
    Location
    Brisbane
    MS-Off Ver
    365
    Posts
    36

    Re: Conditional Formatting usng Two Columns Header

    Sintek,
    Correct me if I am wrong, I changed the column number to 4 as you noted. Bit it didn't give any highlight. Any thought?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Conditional Formatting usng Two Columns Header

    Code needs to be adjusted for correct columns...

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-12-2020
    Location
    Brisbane
    MS-Off Ver
    365
    Posts
    36

    Re: Conditional Formatting usng Two Columns Header

    Many thanks, sintek. It works!
    Much appreciated your help.

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Conditional Formatting usng Two Columns Header

    Glad you got it sorted...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Conditional Formatting using Column Header
    By Deddiph in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-04-2020, 10:12 AM
  2. [SOLVED] Header doesn't show conditional formatting
    By Jackxel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-09-2018, 05:11 AM
  3. [SOLVED] Conditional formatting using lookup table and combination of column and header value
    By uPhone in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-27-2017, 05:53 AM
  4. Conditional formatting on pivot field header
    By dgharvey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-13-2013, 08:25 AM
  5. [SOLVED] Selecting the field header for conditional formatting
    By BenExcel in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-12-2013, 01:38 PM
  6. Why does a column add incorrectly when usng autosum?
    By cindy sue in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2006, 08:25 PM
  7. Compressing Photos usng VBA
    By Paul Johnson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2006, 05:15 PM

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