View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bassman62 Bassman62 is offline
external usenet poster
 
Posts: 117
Default Multiple Functions of a Cell

Drew,

I presume your fuel prices will change from time to time so I would use a
lookup table somewhere in the workbook with the State in the first column
and the fuel price in the second column. This would allow you to easily
update the fuel cost for each state.
Then place the following formula in C2.
=IF(ISNA(VLOOKUP(B2,Lookup_Table,2,0)),"",VLOOKUP( B2,Lookup_Table,2,0))
Replace "Lookup_Table" with the range that contains your table. If you don't
use a named range be sure to use an absolute reference for the table. i.e.
$I$2:$J$51
You can copy this formula down as needed.
Hope this helps.

Dave


"Drew" wrote in message
...
I'm trying to use this spread sheet for purchasing fuel and to subtract
the
fuel tax from the pump price when I purchase fuel so if I type in cell B2
IL
I want $0.43 to show up in Cell C2 but... If I type IN in cell B2 I want
$0.16 to show up in Cell C2 and so on for all the States I buy fuel in
=IF(C2="IL",0.43,0) if I type this in Cell C2 that is good for IL but I
can't
seem to do a multiple =IF in the same Cell