+ Reply to Thread
Results 1 to 5 of 5

Highlight cell based on condition in another cell

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Highlight cell based on condition in another cell

    Hello,

    I am looking for code to highlight cells in column B based on cells in column R = "YES".
    conditional formatting will not work for my specific need.

    Thank you,

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,847

    Re: Highlight cell based on condition in another cell

    I am sure you are right, but curious to know why you think that CF won't work for you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    08-12-2020
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 16
    Posts
    241

    Re: Highlight cell based on condition in another cell

    Hi phbryan, It might be helpful to know why conditional formatting will not work.

    Squeaky

  4. #4
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Highlight cell based on condition in another cell

    Hard to explain, so I've attached an example. This example sheet is sorted a particular way, and "WO #" is highlighted via CF based on column M.
    However, if you change the sorting in any column, then the value in M changes as well. For example, WO73323 and WO75201 are highlighted. If you sort column B ascending, they are no longer highlighted.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-12-2020
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 16
    Posts
    241

    Re: Highlight cell based on condition in another cell

    Hi phbryan, when you sort, are you sorting that single column only and not the whole sheet? When I sort using the AZ arrow, I select expand and it sorts correctly. If I select the entire field and select sort, then the b column and select a-z it works.
    Also, if I select the filter arrow and select sort on column B it works. If I sort B and do not select the rest of the columns it does not work.
    The yes/no answers are calculated based on the information in the other cells and nothing is calculated based on the B row. So when you change the order of B without the other fields, it aligns with a different (or the same) answer in M.
    Last edited by Squeaky; 09-28-2023 at 03:58 PM.

+ 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] CONDITION FORMATTING > Find and highlight cell based on today's week
    By nerzzul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-02-2022, 07:03 AM
  2. Highlight Specific Cell based with condition
    By rachelwahid in forum Excel General
    Replies: 5
    Last Post: 01-22-2019, 12:53 PM
  3. [SOLVED] Need to highlight cell when a condition is met
    By Bluedog in forum Excel General
    Replies: 8
    Last Post: 08-06-2014, 05:19 AM
  4. Replies: 1
    Last Post: 01-20-2014, 03:52 AM
  5. Highlight the cell based on the specific condition
    By shaan65 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2010, 02:07 AM
  6. Highlight Cell per Condition
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2008, 06:07 PM
  7. Highlight Cell per Condition
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2008, 10:21 AM

Tags for this Thread

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