View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Lookup formula - please help!

Hi again,

I just read you question again and realized that I provided the delay in
days when you wanted Delayed or On time. Modify the formula to this if that
is what you want:-

=IF(B2-VLOOKUP(A2,$E$2:$F$5,2,FALSE)<0,"Delayed","On Time")

The formula assumes that if the Data days is larger than the matrix days
then it is delayed and that if data days is the same or less than matrix days
then it is on time.
--
Regards,

OssieMac


"OssieMac" wrote:

Assuming that your data is laid out as per the following:-

Service Matrix Days Difference Data days
Vancouver 7 -1 Vancouver 8
Calgary 5 0 Calgary 5
Edmonton 6 -2 Edmonton 8
Winnipeg 5 -2 Winnipeg 7

Service matrix data (without column header) is in range A2:B5

Data (without column header) is in range E2:E5


Formula in cell C2 (Under Difference):-

=B2-VLOOKUP(A2,$E$2:$F$5,2,FALSE)

Copy the formula down. Result is Number (Positive, Negative or Zero).

Note that the lookup range in the formula is absolute with the $ signs.

--
Regards,

OssieMac


"orquidea" wrote:

Hi

Service Matrix - Days
Vancouver 7
Calgary 5
Edmonton 6
Winnipeg 5

Data days
Vancouver 8
Calgary 5
Edmonton 8
Winnipeg 7

I want to set a formula wich look at the number of days of the data and
match it up with the service defined in the Matrix and determine if the
service is "On Time" or "Delayed". I was trying to do with " If and lookup
" without success.

Could anyone help me please.

Thanks a lot