# Choose a value based on two columns

Hi,

Without being with the if function, how can I create a condition to choose a value based on two columns.

For exemple if a giving value is 4,12 for density and 1,87 to volume the value must be 0,0640 €.

best regards

Example in attached image.
###### Who is Participating?

Commented:
You need 4 columns with min/max density and min/max volume.
See attached.
Volume-Density-Lookup.xlsx
0

Batchelor, Developer and EE Topic AdvisorCommented:
The image is missing.

An IF without an IF is not possible. If you can create a formula generating few integers as condition result, choose can be used.
So what exactly do you mean?
0

Batchelor, Developer and EE Topic AdvisorCommented:
If you want to get fancy, a conditional expression can be used, like =(B1 > C1)*50 which generates 50 if B1 is greater than C1 ...
0

Author Commented:
Hi,

I have many rows to get a price, with two columns  (the price is calculated considering both Density and volume columns, this is a auxiliary table). For each value in Density column i need to verify volume factor to get price.

best regards

Attached image with example
0

Batchelor, Developer and EE Topic AdvisorCommented:
That is something completely different. You need to set up a lookup table with two parameters. With a single one it would be easy (using VLOOKUP with range search), but this one requires something more sophisticated. One way to use a matrix with density as rows and volume as columns, and a nested VLOOKUP and HLOOKUP.
0

Finance AnalystCommented:
You don't need additional columns at all.

See attached file.

Similar to used in this question:Help with Index Match I think
Index-match.xlsx
0

Finance AnalystCommented:
Updated version attached showing the Matrix version that I think Qlemo was referring to, using VLOOKUP and MATCH.
Index-match.xlsx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.