IF formula for 4 different outputs

TruffleOil

New Member
Joined
Sep 9, 2022
Messages
18
Office Version
  1. 2016
Platform
  1. Windows
I have a table with four different criterias which will result in 4 diff values (see picture attached).
I will then have two dropdown menus for the criterias: Select X or Y, and select U or V, which will then show the result in common. so an example: if between X and Y we select X and between U and V we select V, we'll get 30 based on the table.
I'm looking for a formula that will show the final result (30 in this example) based on those criterias. I have Excel 2016 so the IFS formula doesn't work for me..
Thank you in advance!
 

Attachments

  • excel question 4.PNG
    excel question 4.PNG
    22.4 KB · Views: 4

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try:

Book1
ABCDEF
1
2XYDropdown MenusResult
3U1020Y40
4V3040V
Sheet1
Cell Formulas
RangeFormula
F3F3=INDEX(B3:C4,MATCH(E3,B2:C2,0),MATCH(E4,A3:A4,0))
 
Upvote 0
Solution
Try:

Book1
ABCDEF
1
2XYDropdown MenusResult
3U1020Y40
4V3040V
Sheet1
Cell Formulas
RangeFormula
F3F3=INDEX(B3:C4,MATCH(E3,B2:C2,0),MATCH(E4,A3:A4,0))
this worked, thank you! didn't know we could do more than one Match for Index
 
Upvote 0
Try:

Book1
ABCDEF
1
2XYDropdown MenusResult
3U1020Y40
4V3040V
Sheet1
Cell Formulas
RangeFormula
F3F3=INDEX(B3:C4,MATCH(E3,B2:C2,0),MATCH(E4,A3:A4,0))
Hi again! I'm sorry but I double checked and some of the values don't match actually. When I select Y and U for example, it shows 30 as a result instead of 20. See picture attached, the values in red in the table are showing wrong, they look switched. any idea why, should we change anything in the formula? I tried to lock the cells but it's still the same
 

Attachments

  • excel question 5.PNG
    excel question 5.PNG
    11.5 KB · Views: 2
Upvote 0
Try:

Book1
ABCDEF
1
2XYDropdown MenusResult
3U1020Y40
4V3040V
Sheet1
Cell Formulas
RangeFormula
F3F3=INDEX(B3:C4,MATCH(E3,B2:C2,0),MATCH(E4,A3:A4,0))

Hi again! I'm sorry but I double checked and some of the values don't match actually. When I select Y and U for example, it shows 30 as a result instead of 20. See picture attached, the values in red in the table are showing wrong, they look switched. any idea why, should we change anything in the formula? I tried to lock the cells but it's still the sam
ok I tweaked the formula a little and made it like this, I switched rows with columns (attached)
=INDEX(B5:C6,MATCH(F4,A5:A6,1),MATCH(F5,B4:C4,1))
 

Attachments

  • excel question 7.PNG
    excel question 7.PNG
    14.1 KB · Views: 1
Upvote 0
As long as you've got it working to your satisfaction, that's ok. As you've figured out, one of the MATCH's is to match in the row direction, and the other in the column direction. Just make sure the values you use are matching in the right direction. Also, I'm a bit concerned about your using a 1 in the last parameter of the MATCH's. This requires the values to be in sorted order. That could cause a problem depending on what they are. A 0 does not require them to be in sorted order.

Good luck!
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top