+ Reply to Thread
Results 1 to 9 of 9

Conditional formula to Turn cells white when cell inbetween specific time range

  1. #1
    Registered User
    Join Date
    03-14-2020
    Location
    York
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    15

    Question Conditional formula to Turn cells white when cell inbetween specific time range

    Hi,

    I am creating a staff planner and need certain cells to turn white when between a time period. For example: sales assistant starts at 11 finishes at 3. I need the cells between this time range to turn white to indicate they are available to work. See example attached.

    Start times are in Cell F46 and finish time J46. I need cells in X46 and AF 46 to turn White (leaving the other cells black that are already filled)
    Attached Images Attached Images

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    can you load a sample sheet
    a few ways to do that , I would just put a 1 into the cell where it matches
    then have that as black fill and font , then change to a white fill and font via conditional formatting
    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.

  3. #3
    Registered User
    Join Date
    03-14-2020
    Location
    York
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    15

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    Hi,

    Thanks for your feedback. I've attached a sample sheet. The cells are already conditioned to change colour depending on certain text inputted so I wont be able to add alternative text to change the colour of the cell that way?
    Attached Files Attached Files

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    so if the cell changes based on different conditions - what happens exctly

    DRTOS
    I see colours based on those letters
    how are they entered

    also your columns are not entered as TIME - can those labels be chnge to a time rather than TEXT

    you can see the formula in the first row - just for an example , not needed in the cell
    =AND($F46<=T$45,$J46>=T$45)

    But you may need to use STOP if true and reorder the conditional formatting , depending on what rule you want to apply and stay fixed
    Attached Files Attached Files
    Last edited by etaf; 03-14-2020 at 09:20 AM.

  5. #5
    Registered User
    Join Date
    03-14-2020
    Location
    York
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    15

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    Hi,

    The letters are entered manually by the user on the day based on the key. I can change the start and end times to TIME. What do you suggest going forward then?

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    as shown in the attached sheet, in my last post, i have changed the columns to time, you can reformat those to display as you like , if you want AM/PM
    BUT the order of the rules maybe important
    what happens IF one of the letters entered ? that colour needs to be first in list and stop if true

  7. #7
    Registered User
    Join Date
    03-14-2020
    Location
    York
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    15

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    Hi,

    Thankyou for this! This works fine on your example but im having trouble brining this over to my own sheet? It just seems to fill all the boxes in black when inputting times regardless of what times are entered every cell is turned black?

  8. #8
    Registered User
    Join Date
    03-14-2020
    Location
    York
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    15

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    Thanks! All working now. Thankyou for your help! managed to sort it!

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formula to Turn cells white when cell inbetween specific time range

    excellent, very welcome

+ 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: 06-08-2015, 05:20 PM
  2. [SOLVED] Macro to turn all blank cells to 1000 and make them white
    By thelegazy in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 08-06-2013, 12:39 PM
  3. Formula for a range of cells with a certain value to return a specific cell
    By kajjampur in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-05-2013, 06:24 PM
  4. Replies: 11
    Last Post: 07-06-2012, 09:08 AM
  5. Replies: 5
    Last Post: 03-11-2011, 05:28 PM
  6. Replies: 3
    Last Post: 11-03-2009, 03:06 PM
  7. counting everytime red cells turn white per column
    By alymcmorland in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2005, 06:42 AM

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