+ Reply to Thread
Results 1 to 11 of 11

Highlight cells based on value of 1 other cell

  1. #1
    Registered User
    Join Date
    05-03-2020
    Location
    Izegem, Belgium
    MS-Off Ver
    365
    Posts
    8

    Highlight cells based on value of 1 other cell

    Hello,

    I have an Excell sheet with a lot of years in cells: 2019, 2020, 2021
    I also have 1 cell with a date which I change manually, for example 02-03-2019, 01-04-2020

    When I change the date, I want to highlight the cells which have the same year.

    I tried with conditional formatting, but I do not succeed.

    Can someone help me please, step by step.
    Thanks
    Tom

    Date.jpg

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Highlight cells based on value of 1 other cell

    Select the range you want to apply with X33 is active cell.
    Use conditional formatting with bellow formula.
    Please Login or Register  to view this content.
    ❖ Please mark your thread is SOLVED if there has been offered a solution that works fine for you.

    ❖ If you like solutions provided by anyone, feel free to add reputation by clicking on ✶ Add Reputation bottom left of their posts.

  3. #3
    Registered User
    Join Date
    05-03-2020
    Location
    Izegem, Belgium
    MS-Off Ver
    365
    Posts
    8

    Re: Highlight cells based on value of 1 other cell

    Hi huuthang_bd,

    I tried your setting but it doesn't work.
    I'm sure it's me doing something wrong.

    Here is a screenshot:
    The cells are calculated values and at this point the cells with value = 2020 are not marked. I want them to.

    Attachment 676839

    What could be wrong ?
    You want me to upload my Excel file ?

    Thank you for the help.
    Tom

  4. #4
    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,869

    Re: Highlight cells based on value of 1 other cell

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Possibly try this:

    =X33=VALUE(RIGHT($A$3,4))
    Last edited by AliGW; 05-09-2020 at 05:19 AM.
    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.

  5. #5
    Registered User
    Join Date
    05-03-2020
    Location
    Izegem, Belgium
    MS-Off Ver
    365
    Posts
    8

    Re: Highlight cells based on value of 1 other cell

    Hi AliGW, huuthang_bd,
    I uploaded my Excel file (removed the names).

    I want to select the cells from S14 to AE114.

    If I put a date in A3 (03-04-2020), I want the cells with value = 2020 to be marked.
    If I put a date in A3 (17-11-2023), I want the cells with value = 2023 to be marked.

    The file is called copy.xslx

    Thank you
    Attached Files Attached Files

  6. #6
    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,869

    Re: Highlight cells based on value of 1 other cell

    This works in your sample file:

    =VALUE(S14)=YEAR($A$3)

  7. #7
    Registered User
    Join Date
    05-03-2020
    Location
    Izegem, Belgium
    MS-Off Ver
    365
    Posts
    8

    Re: Highlight cells based on value of 1 other cell

    Hi,

    I tried your formula, but nothing happens.
    I really don't know what I am doing wrong.

    - I select my range of cells
    - Click on conditional formatting
    - Enter the formula and choose layout

    Attachment 676857

    But the cells are still not in color.


    This is the manage rules:

    Attachment 676858

    Can I post a video ?

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Highlight cells based on value of 1 other cell

    Selecting either of the attachments in post #7 results in the following message: "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    Attached to this post is a copy of the file from post #5 with Ali's formula applied.
    Note that I chose to fill the affected cells yellow to differentiate from the prefilled cells in the range.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    05-03-2020
    Location
    Izegem, Belgium
    MS-Off Ver
    365
    Posts
    8

    Re: Highlight cells based on value of 1 other cell

    Hello JeteMc,

    Thank you for posting the rule and the excel file.
    I don't know why, but when I selected an area a Semicolon ; appeared between the cells.
    I changed it into a colon : and now it works fine.

    Thank you very much.

    Thank you also AliGW and huuthang_bd.



    =$S$14:$AE$114

  10. #10
    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,869

    Re: Highlight cells based on value of 1 other cell

    FYI My solution worked fine in your file!

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

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Highlight cells based on value of 1 other cell

    You're Welcome and thank you for the feedback. Please do as AliGW states and mark the thread as 'Solved'. I hope that you have a blessed day.

+ 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] Highlight a row of cells based on a highlighted cell.
    By Gazf5 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-28-2020, 08:18 PM
  2. highlight cells based on a value of another cell
    By jayrocco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-08-2019, 01:15 PM
  3. Highlight one cell based on a range of cells
    By claire_wilson in forum Excel General
    Replies: 3
    Last Post: 12-16-2014, 07:15 PM
  4. [SOLVED] Count cells in row based on cell value, highlight row if wrong number or cells.
    By gutterball in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2014, 04:00 PM
  5. highlight specific cells in row based on one cell value in same row.
    By mgbanc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 06:58 AM
  6. Highlight 1 cell based on value from other cells
    By freeon in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-10-2013, 01:24 PM
  7. Highlight or colour a cell or cells based on cells in another range.
    By baffld in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2012, 08:41 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