+ Reply to Thread
Results 1 to 2 of 2

Formula for conditional formatting time blocks in cells

  1. #1
    Registered User
    Join Date
    09-10-2016
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2013
    Posts
    19

    Formula for conditional formatting time blocks in cells

    So I have a column that lists the time during the day in increments of 15 minutes. I want to format each cell so that it will change colors if the current time is equal to or greater than the cell time, and less than the time in the cell next row over. This is what I came up with but it doesn't work. =IF(AND(NOW()>=A15,NOW()<A16),1,0). excel dat time.JPG
    I figured out how to conditionally format the days of the week according to current week day. Now I just need to do this. I'm also wondering once I do find a formula that works, what would be a less tedious/more automated way of conditionally formatting the 100+ column of cells containing the time.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Formula for conditional formatting time blocks in cells

    may need VBA IGNORE entry, as the formula will not auto update, and so need to refresh the calc to get the function to operate
    =AND(TEXT(TODAY(),"dddd")=B$1, (NOW()-TRUNC(NOW()))>=$A2,(NOW()-TRUNC(NOW()))<$A3)
    EDIT - TRUNC(NOW()) is today() so
    =AND(TEXT(TODAY(),"dddd")=B$1, (NOW()-TODAY())>=$A2,(NOW()-TODAY())<$A3)
    THIS WIll ONLY update if the sheet is calculated again to refresh - so will be OK on open and if force a recalc using F9 - So I left the example in case auto updating while the spreadsheet is open is an option
    Attached Files Attached Files
    Last edited by etaf; 09-17-2020 at 12:57 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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: 6
    Last Post: 10-30-2019, 03:52 AM
  2. Conditional Formatting Blocks of Time
    By lizziemac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2018, 01:39 AM
  3. Conditional Formatting according to difference in time in 2 cells
    By so_fistica_ted in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-18-2017, 01:56 PM
  4. Replies: 2
    Last Post: 07-17-2016, 09:21 AM
  5. Conditional formatting to shade blocks of rows
    By MRSH in forum Excel General
    Replies: 2
    Last Post: 07-23-2015, 07:16 AM
  6. Replies: 0
    Last Post: 11-06-2012, 04:09 PM
  7. [SOLVED] Colour conditional formatting alternating blocks of rows
    By Deanomcbeano in forum Excel General
    Replies: 7
    Last Post: 10-03-2012, 01:48 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