Overcome LOOKUP limits and NOW()
edwardpestian wrote:
So what am I doing wrong here?
The first example using LOOKUP works as expected; however the second
example using VLOOKUP does not
="Good"&"
"&LOOKUP(MOD(NOW(),1),{0,0.5,0.75},{"Morning","Aft ernoon","Evening"})&"
"&"Today Is"&" "&TEXT(TODAY(),"mmmm dd, yyyy")
="Good"&"
"&VLOOKUP(MOD(NOW(),1),{0,"Morning";0.5,"Afternoon ";0.75,"Evening"},2,0)&"
"&"Today Is"&" "&TEXT(TODAY(),"mmmm dd, yyyy")
In this case the last parameter of VLOOKUP should be 1, so try this way:
="Good"&" "
&VLOOKUP(MOD(NOW(),1),{0,"Morning";0.5,"Afternoon" ;0.75,"Evening"},2,1)&" "
&"Today Is"&" "&TEXT(TODAY(),"mmmm dd, yyyy")
--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)
Hope I helped you.
Thanks in advance for your feedback.
Ciao
Franz Verga from Italy
|