+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting VBA

  1. #1
    Registered User
    Join Date
    06-12-2017
    Location
    London, England
    MS-Off Ver
    MS Office 2016
    Posts
    12

    Post Conditional Formatting VBA

    Hello,

    Could you please help me out?
    I would like VBA to apply colours for cells with certain value - details attached.

    This should apply to the whole sheet as soon as the value is entered.

    Many thanks!
    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,164

    Re: Conditional Formatting VBA

    Hi Daiwuliz

    Please explain in more detail...Your explanation on uploaded file makes no sense...
    When what happens in what cells must what conditions be met....
    green (only that cell)
    red (only that cell)
    light grey (A:D)
    yellow (only the cell)
    orange (when blank, only the cell)
    Last edited by sintek; 01-11-2018 at 01:29 PM.
    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
    06-12-2017
    Location
    London, England
    MS-Off Ver
    MS Office 2016
    Posts
    12

    Re: Conditional Formatting VBA

    Sorry..
    The conditions are:
    if any cell in column C contains Y, change colour of that cell into green.
    if N - red,
    if P - yellow,
    if N/A - highlight the whole row (A:C) - light grey.

    So in the attached example, my expectation would be C2 (green), C3 (red), A4:C4 (grey) and C6 (orange). The file may potentially have hundreds of rows, so that would really help to visually identify the results.

    Thank you!

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

    Re: Conditional Formatting VBA

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by sintek; 01-12-2018 at 07:54 AM. Reason: CHANGED CODE...

  5. #5
    Registered User
    Join Date
    06-12-2017
    Location
    London, England
    MS-Off Ver
    MS Office 2016
    Posts
    12

    Re: Conditional Formatting VBA

    Thank you for that, but it does not seem to work for me. Could you please check? Many thanks!

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

    Re: Conditional Formatting VBA

    Works for me ....see upload
    Type "P" or "N" or "N/A" etc
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-12-2017
    Location
    London, England
    MS-Off Ver
    MS Office 2016
    Posts
    12

    Re: Conditional Formatting VBA

    Thank you! Could it please be amended a bit to not be case sensitive? Thanks

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

    Re: Conditional Formatting VBA

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Last edited by sintek; 01-19-2018 at 06:50 AM.

  9. #9
    Registered User
    Join Date
    06-12-2017
    Location
    London, England
    MS-Off Ver
    MS Office 2016
    Posts
    12

    Re: Conditional Formatting VBA

    Perfect, thanks! One more last thing.... If I enter N/A - if changes the whole all three cells in the row (which is great), but if I change the value into any other, it A and B are still grey...

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

    Re: Conditional Formatting VBA

    Please Login or Register  to view this content.

+ 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] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  2. Replies: 1
    Last Post: 12-08-2016, 03:14 PM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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