Multiple conditions

Zubair

Active Member
Joined
Jul 4, 2009
Messages
332
Office Version
  1. 2016
Platform
  1. Windows
Hi Experts,

Given below my excel sheet,

I want formula in cell B5 to bring figure based on the selection of B1:B3 from the array E5:K7, with flexibility of changing cell A5, like currently appearing sales, if I put Cost in cell A5 it should give figure 120.

1737535796070.png
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hello! Try it
Excel Formula:
=INDEX(E5:K7,MATCH(1,(A5=D5:D7)*(B1=E1:K1)*(B2=E2:K2)*(B3=E3:K3),0))
 
Upvote 0
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

Does this do what you want?

25 01 22.xlsm
ABCDEFGHIJK
120242023202320242024202320242024
2MayJanJanMayFebMarAprMay
3Scenario 1Scenario 1Scenario 2Scenario 1Scenario 2Scenario 5Scenario 2Scenario 2
4
5Sales365Sales322718365556485140159
6Cost128224463763177741905
7Profit/(Loss)102251173828853559962
Lookup Value
Cell Formulas
RangeFormula
B5B5=SUMPRODUCT((D5:D7=A5)*(E1:K1=B1)*(E2:K2=B2)*(E3:K3=B3),E5:K7)
 
Upvote 0
Solution
Yes thanks that's what I needed.

for XL2BB I tried number of time but not able to bring it for use. Will keep try.

Thanks again
 
Upvote 0

Forum statistics

Threads
1,226,079
Messages
6,188,771
Members
453,499
Latest member
samdan87153

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