ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   lookup function (https://www.excelbanter.com/excel-discussion-misc-queries/95311-lookup-function.html)

B G

lookup function
 
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

tim m

lookup function
 
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?

"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


Max

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



All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com