How to lookup ColumnName in table A that matches CellName (enum) in Table B?

I may be asking the wrong question but…

I have one sheet (Sheet A) consisting of items and prices.
Each item has one UniqueID and one Row.
Each item has 4 prices ([Price1],[Price2],[Price3],[Price4])

On a second sheet I have a list of UniqueID which are a reference to the above items.
There is a column called [Select Price] and [Price]
Each cell/row under [Select Price] is an Enum with choices exactly matching the 4 price column names of Sheet A which are;
Price1, Price2, Price3, and Price4
How can I populate [Price] on sheet B with the price (cell) on Sheet A that is under the column matching [Select Price] on sheet B?

I am going crazy I cannot figure it out it seems to be I am unable to lookup a column where the column is equal to the value of something else.

I tried to simplify for this post but basically - I have a list of used items with different price values according to the condition of the items, if I make a dashboard or quote or invoice, I need to select the item and condition and populate the correct price based on the condition.

0 5 551
5 REPLIES 5

Hi @cameraville Have you tried using Select or lookup?

Hi thank you, yes I can’t figure it out. I cannot type in a formula which column I am looking up because the column I want is the one that matches the result from my Enum.

I basically want to say - Find the row in another sheet that matches this UniqueID and return the value of the column from the column whose name is equal to the value of [Condition] in this sheet.

It sounds that you need to use group of IF statements…
SWITCH([Select Price],
“Price1”,[Parent ID].[Price1],
“Price2”,[Parent ID].[Price2],
“Price3”,[Parent ID].[Price3],
“Price4”,[Parent ID].[Price4],
0)

This is new to me I will try it and see how it goes - thank you for the suggestion!

You’re welcome

Top Labels in this Space