Thread: lookup function
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default lookup function

Probably you might be looking for something like this:

Assuming quantity figs are running down in AA2,

Then in say, AD2:
=IF(AA2="","",AA2*VLOOKUP(AC2,{"PB",1;"EP",2;"BL", 5;"HI",8},2,0))

where the VLOOKUP's table_array: {"PB",1;"EP",2;"BL",5;"HI",8}
would house the ref/unit numeric $values associated with the codes in col AC

AD2 could then be copied down to return correspondingly ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"B G" wrote:
I have a lookup function question
Column AC will have one of the following disposal codes (disposal site) (PB,
EP, BL, HI, VA, MA etc)
Each of those Codes has a different $ value

I need to know if there is a way to have a cell calculate a different value
based on the Code that is column AC.

Basically we are trying to find the most profitable disposal site
--
Barb