IF Statement

B

Brent

I am trying to create an "IF" statement whose value is contingent upon a
range of cells. Basically, I have 5 cells with 5 different dates. I also
have a cell which is designated to search the 5 date cells ("IF" statement)
and if one of the cells has a date less than or equal to today's date...I
want my "IF" statement to notify me. Right now, I can only search one cell.
Any suggestions?
 
W

ww

If your dates are in a range like A1:A5 you could use
=sumproduct(--(A1:A5<=today()))
And it will return the number of days in the range that are less than equal
to
today's date so if it says 0 there aren't any otherwise there are.

Another way would be to use
=if(or(a1<=today(),a2<=today(),a3<=today(),a4<=today(),a5<=today()),"Yes","")

This will say Yes if there are any days in the range less than or equal to
today. If there aren't any it would just remain blank.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top