+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting Formula Based on Cell to Left

  1. #1
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    168

    Conditional Formatting Formula Based on Cell to Left

    Hi all,

    I have a list of dates in Column C and i am trying to get Column D to highlight that row when the date equals today so that the row for today is always highlighted. I managed to get this to work using the specific cell reference but i need to use a formula which doesn't reference the cell specifically and instead references the cell to the left.

    =IF(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1)=TODAY()

    I have tried using the above formula, the OFFSET returns the value of the cell to the left and i wrapped this an IF function for today but can't get it to work, any assistance would be appreciated!

    Thanks in advance.
    Excel Beginner

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Conditional Formatting Formula Based on Cell to Left

    Use the following conditional formatting formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and apply to range $D:$D
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Conditional Formatting Formula Based on Cell to Left

    Because TODAY() is a volatile formula, and CF can also slow your file down if used excessively, I would suggest that you put =TODAY() in it's own cell (say E1), and then reference that in the CF rule...
    =$C1=$E$1

    Also, avoid using full-column references in CF (see above), rather, use just the range you need, or, if that will grow, 3-4 times what you think your range would need to be.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Conditional Formatting Formula Based on Cell to Left

    If you do not want to bother about the range, select it and apply the CF (=$C1=$E$1 or whatever) to the selected range - Then click - Insert - Table ( check My range has headers or not) - OK
    Now each time you add a row, the CF will follow automatically

  5. #5
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    168

    Re: Conditional Formatting Formula Based on Cell to Left

    Hi all, many thanks for your assistance, i managed to get it working using your support and solutions. Thanks all!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Conditional Formatting Formula Based on Cell to Left

    Happy to help

+ 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] Conditional formatting:If statement based on cell value to the left!
    By Keibri in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-15-2017, 03:25 PM
  2. [SOLVED] Conditional Formatting, with formula based on the value from another cell
    By Alphabex in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-26-2015, 07:43 PM
  3. Replies: 5
    Last Post: 08-19-2013, 03:13 PM
  4. Replies: 5
    Last Post: 05-11-2012, 06:40 AM
  5. conditional formatting based on formula not cell value
    By Ramzes in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-03-2011, 07:34 AM
  6. Replies: 1
    Last Post: 05-20-2010, 02:07 PM
  7. Apply conditional formatting to a cell when it is left BLANK
    By researchrach in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-30-2008, 10:59 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