Vlookup and IF
Excel stores the time portion as the decimal portion of a double numeric
format, so let's say you have in column B as level of service, in column C
as Date and Time of call, and you have in column D as Delivery Due Date and
Time.
In Cell D5, you would use the following formula:
=IF(B5="Good",IF(C5-INT(C5)<.5,INT(C5)+TIMEVALUE("17:00:00),INT(C5)+1. 5),IF(B5="Faster",C5+TIMEVALUE("02:00:00"),IF(B5=" Fastest",C5+TIMEVALUE("01:00:00"),"")))
As you can see, this is using nested functions, which you can have up to 7
levels of nested functions within the same cell.
Ronald R. Dodge, Jr.
Master MOUS 2000
wrote in message
oups.com...
I am unable to figure out the formula for and IF factor in Vlookup.
Example I have three delivery service, Good, Faster, Fastest. each
has a time alloted to them.
Faster is delivered in 2 hours and Fastest is delivered in 1 hour.
The problem is Good. How do I get a formula so that when Good is
entered in the delivery type cell, it will choose the the formula
according to the activated time.
i.e. If p/u at 8:am we have until 5pm to deliver, but if the call is
entered after 11:59am we have until 12noon the next day to deliver. I
cannot use different names, it needs to choose the appropriate
formula.
Thanks for your help
JP
|