+ Reply to Thread
Results 1 to 6 of 6

Highlight A Cell Based On Exact Text Of An Adjacent Cell

  1. #1
    Registered User
    Join Date
    02-03-2024
    Location
    Mesa, AZ USA
    MS-Off Ver
    MS 365
    Posts
    13

    Highlight A Cell Based On Exact Text Of An Adjacent Cell

    Hello All:

    I'm in a predicament, and I couldn't find a solution, that actually works, after doing a search here, and on the web. All of the examples I found online don't seem to work, possibly because I'm using a drop-down list.

    I have a spreadsheet which has multiple columns of data, but I'm only working with two columns for my example. In Column C, I have a drop-down list with various choices. In Column D, I have a list of Customer Names. For this example, what I'm trying to do is use conditional formatting to fill a particular cell in Column C red if a certain Customer Name is chosen in Column D, and Column C is left blank. So, using my example, if ACME Mouldings is chosen in Column D, but Column C doesn't contain an item (is blank) from the drop-down list, I want it to turn red, like in my attached sample file. I had to fill it manually to show the result I want.

    Any insight/assistance would be greatly appreciated!

    William

    Sample Data-Dropdown List.xlsx

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,934

    Re: Highlight A Cell Based On Exact Text Of An Adjacent Cell

    Conditional Formatting rule

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    set FILL to RED
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-03-2024
    Location
    Mesa, AZ USA
    MS-Off Ver
    MS 365
    Posts
    13

    Re: Highlight A Cell Based On Exact Text Of An Adjacent Cell

    Thank you for that, John!

    However, this doesn't quite do what I'm trying to accomplish. The "Work Type" is only a requirement for ACME Mouldings, so if I enter XYZ Doors on Row 3, without entering a Work Type, that also turns red. I only want the cells in Column C to turn red if the customer is ACME Mouldings. These are just 2 examples of customers. I have many, so the Customer Name field will not necessarily only contain these two names. I was hoping for a formula that I could apply to the entire column, not just an individual cell, because they won't be listed in any particular order. I have multiple tables in the same sheet, and the table this information appears in, is actually sorted by a different column based on the date of the job, so this list will constantly be re-sorted as new jobs get added to the list. I tried changing the formula you gave me to include a range, like $c2:$c29, substituting = for the <> and a customer name as the syntax for D2, so it looked like this =AND($C2:$C29="", $D2:$D29="ACME Mouldings"), but that didn't work at all.

    Attachment 878816
    Last edited by WmSWoodson; 09-11-2024 at 06:01 PM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,227

    Re: Highlight A Cell Based On Exact Text Of An Adjacent Cell

    Just change John's rule to this:

    =AND($C2="",$D2="ACME Mouldings")
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    02-03-2024
    Location
    Mesa, AZ USA
    MS-Off Ver
    MS 365
    Posts
    13

    Re: Highlight A Cell Based On Exact Text Of An Adjacent Cell

    Thanks, Ali! That seems to have worked. I tried that variation too, in addition to the one I mentioned above, and couldn't get it to work. I'm not sure why it works now, and I'm not exactly sure how it works. I would have thought that a series like $C2:$C18 would have been required, since my data is spread across multiple rows. Either way, thanks again, to everyone who offered help! It's greatly appreciated!
    Last edited by AliGW; 09-13-2024 at 12:12 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,227

    Re: Highlight A Cell Based On Exact Text Of An Adjacent Cell

    You set the rule for the first cell(s) in the range (first row). Excel then changes the row reference on the fly for each row of the range you set it to apply to.

+ 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. Replies: 11
    Last Post: 07-20-2022, 04:12 AM
  2. Replies: 8
    Last Post: 05-13-2022, 01:57 AM
  3. [SOLVED] How To Highlight Cell Based on Adjacent Cell Value
    By nevernine9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2022, 08:43 AM
  4. Replies: 4
    Last Post: 05-27-2021, 04:24 AM
  5. Replies: 2
    Last Post: 12-04-2019, 01:09 AM
  6. [SOLVED] Conditional Formatting to highlight text plus adjacent cell
    By mpitre in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-15-2018, 01:59 PM
  7. Macro that will clear contents of cell based on format of text in adjacent cell
    By judasdac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2012, 01:56 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