+ Reply to Thread
Results 1 to 5 of 5

Conditonal formatting based off date&time

  1. #1
    Registered User
    Join Date
    06-16-2008
    Posts
    43

    Conditonal formatting based off date&time

    thanks to the great help of daddylonglegs i've been able to take my julian date/time in column 'D' and apply it as a standard date/time format that excel understands in column 'BL'

    what i would like to have happen is when the date/time in column 'BL' is 20 minutes from expiring (based off local computers time) for it to fill in the corresponding cell in column 'D' as 'yellow'

    and when the time has expired to fill the corresponding cell in column 'd' as 'red'

    is this possible either as a formula or in vba? Im using excel 2007

  2. #2
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    is it safe to assume that this cant be done then? any advice would be appreciated. TIA

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You can do this with conditional formatting like this: [revised]

    Select whole column D and Format > Conditional Formatting > use "formula is" option and set these conditions

    condition 1
    =(NOW()>BL1)*(BL1<>"")
    format red

    condition2
    =(NOW()+"0:20">=BL1)*(BL1<>"")
    format yellow

    ...however this won't update automatically as time passes so you might need some VBA to do that. This code will put a clock on your spreadsheet and also update the conditional formatting automatically.
    Last edited by daddylonglegs; 06-30-2008 at 07:47 PM.

  4. #4
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    sorry for the late reply, i'm living in korea at the moment and working some 'strange' hours to say the least.

    anyways, so i added the conditional formatting, so thats done. now as for the time the code in the link you gave me was
    Please Login or Register  to view this content.
    now heres a really newb question, the part of that code that says 'range(c3) and (c4) do i need to change those to the appropriate blocks in my spreadsheet or is it unrelated? i feel pretty stupid asking that, since i think i know the answer...

    the next question... with this macro, will i need to have a button to press on the sheet somewhere? (thats cool if its the case) or can i just add the code to the sheet and it will run automatically?

  5. #5
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    well... i got it working kinda...
    problem is i have a macro that updates this page with info from the other sheets in the workbook.
    Please Login or Register  to view this content.
    how can i make it so this will only refresh the results from column a-j rows 1-31? once thats settled i know how to finish everything since i disabled that macro and the conditional formatting works great. =)

+ 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