View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Adding IF function to Lookup???

The following formula is possibly more complex than needed but it
seems to work. For simplicity I used a group of cells in K25:M29:
1 0 =1/12
2 0 =1/6
3 1 0
4 2 0
5 7 0

As you can see the 2nd column contains the days and the 3rd column
contains the hours. With this in mind:

=WORKDAY(E38,VLOOKUP(J38,$K$25:$M$29,2),Holidays)
+MOD(E38,1)+VLOOKUP(J38,$K$25:$M$29,3)+(MOD(E38+VL OOKUP(J38,$K$25:$M
$29,3),1)TIME(17,0,0))*2/3

You will need a range named Holidays as needed by WORKDAY.

HTH
Kostis Vezerides

On Dec 21, 3:16 pm, DaveAsh wrote:
Hi I have set up a lookup formula to calculate the projected finish time for
a job in the format dd/mm/yyyy hh:mm , this is:

=LOOKUP(J38,{1,2,3,4,5},E38+{"0.083333333333333333 333333333333333","0.166666666666666666666666666666 67","1","2","7"})

E38 is the date/time that the job was logged
J38 is the prority status (1-5)

The priority status related to:
1-completion should be within 2 working hours
2-" " " " " 4 working hours
3-" " " " " 1 day
4-" " " " " 2 days
5-contact should be within 2 days

How can i add to the formula using =if to make the formula not give days
which are weekends or out of hours (after 5pm to 8.59am)

Thanks.