Results 1 to 6 of 6

ANDIF function

This is a discussion on ANDIF function within the Excel Questions forums, part of the Question Forums category; Is it possible to write a formula that will compare a date and time and make the font RED if ...

  1. #1
    New Member
    Join Date
    Jul 2010
    Posts
    3

    Question ANDIF function

    Is it possible to write a formula that will compare a date and time and make the font RED if it meets a specific criteria? EX: If I2 thru I100 AND J2 thru J100 are < the current date and time, THEN change the font color to RED. I would want it to look at I2 & J2 and change if meets criteria, then I3 & J3 etc.

  2. #2
    Board Regular dave3009's Avatar
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    6,292

    Default Re: ANDIF function

    Hi Pam123 and welcome to the forum

    You could use conditional formatting for this I'm sure, highlight range I2 to J200 goto Format>>Conditional Formatting>>Formula Is:

    =I2
    Set desired format and click OK.

    Now dates < today in I2:J100 will display in desired format.

    HTH


    Dave

  3. #3
    New Member
    Join Date
    Jul 2010
    Posts
    3

    Default Re: ANDIF function

    Hi Dave..Thanks, but this doesn't work because I need it to do the comparison in conjunction with one another. ie: Todays date (column I) is 07/28/2010 and the time (column J) is 20:07. I want it to look at column I and J for any date/time prior to 07/28/2010 20:07. Is this even possible??

  4. #4
    Board Regular dave3009's Avatar
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    6,292

    Default Re: ANDIF function

    Try

    =$I2+$J2 < NOW()

    as the function

  5. #5
    New Member
    Join Date
    Jul 2010
    Posts
    3

    Default Re: ANDIF function

    That didn't work either, Dave. I think i am just out of luck, but thanks for trying.

  6. #6
    Board Regular PA HS Teacher's Avatar
    Join Date
    Jul 2004
    Location
    Rochester, NY
    Posts
    2,838

    Default Re: ANDIF function

    Did you use
    'Formula Is'

    and enter:
    =$I2+$J2 < NOW()

    (Then copy the formatted cell) (say, K2?)
    and do a paste special, formats to K3:K100
    Recent Draftee
    www.mrexcel.com/board2/viewtopic.php?t=199272
    Recently came across a Free 1 GB Storage/File Sharing Site www.box.net

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com