![]() |
IF(NOW()
I need to select value from different cell depending on if NOW() is within
certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
I don't understand exactly what you want from your If/Or/Between function,
but when using dates in such a formula do it like this - Date(yyyy,m,d) Also,although not incorrect you could use the TODAY function instead of NOW eg =TODAY()=DATE(2008,2,5) Enter the year in full as above unless you want 1908 Regards, Peter T "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
Hi Rick
A method I have used involves use the Vlookup function. This LAST parameter is the trick here, if you set it to TRUE (or blank) then the Vlookup stops at (or the next record after) the lookup cell. The key is your look up cell Must be numerical (or alphabetical Order) A B 1 10/01/2008 Dogs 2 20/01/2008 Cats 3 14/02/2008 Pigs =Vlookup(Now(), $A$1:$B$3,2,True) will return For Now() or Today() = 10/01/2008 Dogs 15/01/2008 Dogs 31/01/2008 Cats 15/02/2008 Pigs I hope that Helps Enjoy Aloha Jeff "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
Thx Peter for reply... what I was trying to show was some ways that I thought
could be used to have a set date range and compare that range to NOW(). I know just enough about VBA to get started but when it comes to the finer points I get stuck. As I said what I want to do is select a valve from a cell if NOW() is within stated date range. Hope I have cleared up some of your Qs I don't really care if I use BETWEEN/AND or some other method. I would like to use nested "IF" statements. Thx again -- RickLM "Peter T" wrote: I don't understand exactly what you want from your If/Or/Between function, but when using dates in such a formula do it like this - Date(yyyy,m,d) Also,although not incorrect you could use the TODAY function instead of NOW eg =TODAY()=DATE(2008,2,5) Enter the year in full as above unless you want 1908 Regards, Peter T "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
[sorry for replying to you Peter,
I lost the original post] I think you want the IF/AND/OR/BUT/NOT syntax? IF(OR(NOW()="2/1/2008",NOW()<="2/29/2008",H4,IF(OR( etc. "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
Correction on ()s.
It's OR(cond1,cond2) IF(OR(NOW()="2/1/2008",NOW()<="2/29/2008"),H4,IF(OR( etc. Dave D-C wrote: [sorry for replying to you Peter, I lost the original post] I think you want the IF/AND/OR/BUT/NOT syntax? IF(OR(NOW()="2/1/2008",NOW()<="2/29/2008"),H4,IF(OR( etc. "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
IF(NOW()
Dave D-C
Thanks for the help it works great... but then you knew it would. Thx again -- RickLM "Dave D-C" wrote: Correction on ()s. It's OR(cond1,cond2) IF(OR(NOW()="2/1/2008",NOW()<="2/29/2008"),H4,IF(OR( etc. Dave D-C wrote: [sorry for replying to you Peter, I lost the original post] I think you want the IF/AND/OR/BUT/NOT syntax? IF(OR(NOW()="2/1/2008",NOW()<="2/29/2008"),H4,IF(OR( etc. "RickLM" .(donotspam) wrote in message ... I need to select value from different cell depending on if NOW() is within certain date rate ranges using: IF(NOW() =2/1/2008 OR <=2/29/2008,H4,IF(NOW() =3/1/2008 OR <=3/31/2008,I4,xxxRepeat IF for n of date rangesxxx) OR BETWEEN AND or some other/better way Date range may or may not be a complete moth and could be like 2/15/2008 and 3/28/2008 Thanks -- RickLM |
All times are GMT +1. The time now is 10:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com