IF Statement
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? |
One way:
=IF(COUNTIF(A1:A5,"<=" & TODAY())0,"Be notified", "") In article , "Brent" wrote: 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? |
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<=tod ay(),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 "Brent" wrote: 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? |
Perfect....The "COUNTIF" threw me off a bit, but it worked...Thanks.
"JE McGimpsey" wrote: One way: =IF(COUNTIF(A1:A5,"<=" & TODAY())0,"Be notified", "") In article , "Brent" wrote: 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? |
All times are GMT +1. The time now is 03:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com