+ Reply to Thread
Results 1 to 6 of 6

How to format range of cells if J4 date is today?

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    How to format range of cells if J4 date is today?

    In cell J4 I have a specific date, Is there a way to format B4:P4 if J4 date is today?

  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
    79,324

    Re: How to format range of cells if J4 date is today?

    What do you mean by 'format'? Formatting is not controlled via formulae - do you mean change the contents? What EXACTLY are you trying to do?
    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
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: How to format range of cells if J4 date is today?

    Specifically what i want to do is to identify if J4 date is today and if yes then automatically format B4:P4 with a color.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: How to format range of cells if J4 date is today?

    Use this as the CF fromula and apply it to B4 to P4.

    =$J$4=TODAY()
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,401

    Re: How to format range of cells if J4 date is today?

    Quote Originally Posted by Mr.Castle View Post
    Specifically what i want to do is to identify if J4 date is today and if yes then automatically format B4:P4 with a color.
    You cannot do that with a formula in a cell. There are two ways to do it... one is with Conditional Formatting (see Message #4 for that solution) and the other is with VBA code. Here is an event procedure which will do what you asked for...
    Please Login or Register  to view this content.
    HOW TO INSTALL Event Code
    ------------------------------------
    If you are new to event code procedures, they are easy to install. To install it, right-click the name tab at the bottom of the worksheet that is to have the functionality to be provided by the event code and select "View Code" from the popup menu that appears. This will open up the code window for that worksheet. Copy/Paste the event code into that code window. That's it... the code will now operate automatically when its particular event procedure is raised by an action you take on the worksheet itself. Note... if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook
    Last edited by Rick Rothstein; 09-01-2019 at 02:35 AM.

  6. #6
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: How to format range of cells if J4 date is today?

    This is exactly what i wanted, the code worked perfectly.

    Thank you very much Rick

+ 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. Formula to Count Consecutive Blank Cells in a Range Depending on Today's Date
    By tophatpete in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-28-2020, 05:12 AM
  2. Replies: 4
    Last Post: 02-06-2017, 10:20 PM
  3. Replies: 4
    Last Post: 09-12-2013, 11:32 PM
  4. [SOLVED] Find cells with today's date and copy asscoiated range
    By paulary30 in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 01-05-2013, 01:48 PM
  5. Replies: 1
    Last Post: 09-30-2012, 03:01 PM
  6. Replies: 1
    Last Post: 09-17-2012, 01:07 AM
  7. Replies: 3
    Last Post: 12-11-2007, 01:36 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