lookup function

G

Guest

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
 
G

Guest

Can you elaborate a bit? Where is the $ value for those codes, in a column
next to the codes column? What do you mean by have a cell calculate a
different value?
 
G

Guest

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 ..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top