View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Choose a specific calculating formula for a cell

Hi

=IF(HOUR(B1)=12,C1-A1-15/24,IF(HOUR(B1)=17,C1-A1,""))

The final null "" is for the situation if B1 is neither 12:00 nor 17:00.
Amend to suit.

--
Regards

Roger Govier


wrote in message
oups.com...
How do I get a cell to look at another cell and when a specific
parameter is met it chooses the correct formula

i.e.

First parameters

A1: cell has the value 07/04/2007 9:45 Available at
B1: cell has the value 07/04/2007 17:00 Due by Time
C1: cell has the value 07/04/2007 14.30 Time delivered

Calculation A for this parameter would be =c1-a1

Second parameters

A1: cell has the value 07/04/2007 12:30 Available at
B1: cell has the value 08/04/2007 12:00 Due by Time
C1: cell has the value 08/04/2007 10.30 Time delivered

Calculation B for this parameter would be =c1-a1-15/24

HOW DO I GET CELL D1 to choose calculation A when the due by time is
17:00 or calculation B when the due by time is 12:00

Thanks
JP