olivia.ruiz82
New Member
- Joined
- Feb 21, 2011
- Messages
- 4
Help determining if a date or number of days is greater then or less then a date.
Computer System: Excel 2007, Windows XP
In Cell A2, list of dates i.e. 12/30/2010
I would like to create a formula (IF statement maybe?) to see if the date in A2 is less then 14 days, then return "3", if false then check to see if the date in A2 is greater than "15" days, but less than "28" days, then return "4", if false, then check to see if A2 is equal to "29", "30", "31", if true then return "5".
I have come up with "=IF(U3<="14","3",IF(U3>="15"<="28","4",IF(U3=29,"5",IF(U3=30,"5",IF(U3=31,"5")))))" but this returns "3" when A2 is 12/30/2010.
I also tried using the DAY function to covert the date to number of days, which looks like "=IF(DAY(U2)<="14","3",IF(DAY(U2)>="15"<="28","4",IF(DAY(U2)="29","5",IF(DAY(U2)="30","5",IF(DAY(U2)="31","5")))))"
Computer System: Excel 2007, Windows XP
In Cell A2, list of dates i.e. 12/30/2010
I would like to create a formula (IF statement maybe?) to see if the date in A2 is less then 14 days, then return "3", if false then check to see if the date in A2 is greater than "15" days, but less than "28" days, then return "4", if false, then check to see if A2 is equal to "29", "30", "31", if true then return "5".
I have come up with "=IF(U3<="14","3",IF(U3>="15"<="28","4",IF(U3=29,"5",IF(U3=30,"5",IF(U3=31,"5")))))" but this returns "3" when A2 is 12/30/2010.
I also tried using the DAY function to covert the date to number of days, which looks like "=IF(DAY(U2)<="14","3",IF(DAY(U2)>="15"<="28","4",IF(DAY(U2)="29","5",IF(DAY(U2)="30","5",IF(DAY(U2)="31","5")))))"