+ Reply to Thread
Results 1 to 8 of 8

Conditionally Formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    08-18-2007
    Posts
    62

    Conditionally Formatting

    I got a spread sheet with time data that I need to conditionally validate. The column looks like this ;
    TIME
    6:00 AM
    6:13 AM
    6:36 AM
    6:45 AM
    7:00 AM
    7:13 AM
    All the
    Way
    down to
    5:00 PM

    What I need is to turn RED BOLD the time frames 6:30 AM 9:00 AM, 12:00 PM, 2:45 PM , now the data entry for these time values are not going to fall in the exact times, so what I need to do is turn red bold the closes next up values red bold. I try to use conditionally validation, but it only let me do only 3.
    How can I conditionally validate this set of 4 time frames? Can an expression do it? Function? If Statement? ….Any orientation is well appreciated . I posted this question on the Programming Forum, but didn’t had any input, that is the reason I’m posting here now.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,729
    OK, assuming your time values are in A2:A100 in ascending order and you want to format red bold the first time on or after those times.

    A1 should be blank or zero - If you want it to show time just custom format as

    "TIME"

    Select A2:A100 and use this formula within conditional formatting:

    =OR(AND(A1<"6:30"+0,A2>="6:30"+0),AND(A1<"9:00"+0,A2>="9:00"+0),AND(A1<"12:00"+0,A2>="12:00"+0),AND(A1<"14:45"+0,A2>="14:45"+0))

    format red bold

    OK

  3. #3
    Registered User
    Join Date
    08-18-2007
    Posts
    62
    Daddylonglegs, thank you for your replay.
    I followed you instructions and all the entered values turn red bold. What can I be doing wrong?

  4. #4
    Registered User
    Join Date
    08-18-2007
    Posts
    62
    Daddylonglegs, ...my bad.. I copied your formula from the post and it did your for the 3 first values except the value after 2:45. I look at the formula and can not see anything different from the other sections of the formula?!?..Also if you can explain why you have to leave the first cell blank..I have headers for this report. Can I changed the section of the formula where it refers to the empty cell for what is in my header? the column location wont change it will always be the same .

    Thanks again daddylonglegs!

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,729
    You're saying that the first value after 14:45 doesn't change colour? What time is that? Can you format the time as a number, what do you get?

    I suppose that as your times are in ascending order A2 would always be formatted if it's greater than your first time, 06:30, so for A2 only change the CF formula to

    =A2>"6:30"+0

  6. #6
    Registered User
    Join Date
    08-18-2007
    Posts
    62
    You're saying that the first value after 14:45 doesn't change colour?
    correct didnt happen after the next 14:45, I'm including the file I was experimenting with. Also formated the range to numbers and nothing diffrent happen.DLL what is the purpose of leaving blank thr first cell,can this be done leaving the first cell with a string?

    Thanks again DLL!
    Attached Files Attached Files

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,729
    The conditional formatting is working correctly but your times 1:45, 2:45 and 2:55 are AM times, if you want these to be recognised as PM times you either need to input like 13:45 or 1:45 PM

    My suggestion above was to just change conditional formatting in A2 only to

    =A2>"6:30"+0

    then you can have what you want in A1

  8. #8
    Registered User
    Join Date
    08-18-2007
    Posts
    62

    Thumbs up

    ASOME! daddylonglegs....you were right ..I was lost! I was entering just the time without the AM-PM. It work pretty good. In regard to the first cell value it works too.

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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