How to make Array Formula with "or" condition

jasontoh

New Member
Joined
May 13, 2011
Messages
16
Hi,

Can someone help me: how to make Array Formula in cell B11 with condition "A or B & Y"

Thanks
Jason

===================================================

Excel Workbook
ABC
1Condition 1Condition 2Data
2AY0.20
3CY0.45
4BN1.10
5BY12.00
6AN9.40
7AN0.01
8***
9*Y*
10A0.20*
11A or B?*
Sheet1
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Actually you don't need to use "array formulas"
You can replace the B10 formula with this:
Code:
=SUMPRODUCT((A2:A7=A10)*(B2:B7=B9)*C2:C7)
and use this for the "or" formula
Code:
B11: =SUMPRODUCT((A2:A7={"A","B"})*(B2:B7=B9)*C2:C7)

Is that something you can work with?
 
Upvote 0
Hi Ron,

Thanks for the quick & interesting solution
But my issue is that column C contain formula to display blank cell & it does not work with sumproduct in case it become blank
I change my sample table to show this issue
Will be glad if there is another way out

Jason
===============================================

Excel Workbook
ABCDE
1Condition 1Condition 2ResultDataRate
2AO0.200.201.0
3CO0.680.451.5
4B**1.101.0
5BO12.0012.001.0
6A**9.402.0
7AO0.020.011.5
8C**0.451.0
9A**0.221.0
10*****
11*OO**
12A#VALUE!0.22**
13A or B#VALUE!?**
14*****
15*sumproductCSE**
Sheet1
 
Upvote 0
Hi Ron,

Thanks for the quick & interesting solution
But my issue is that column C contain formula to display blank cell & it does not work with sumproduct in case it become blank
I change my sample table to show this issue
Will be glad if there is another way out

Jason
===============================================

Can someone help me: how to make Array Formula in cell B11 with condition "A or B & Y"
Try this...

=SUMPRODUCT(--(ISNUMBER(MATCH(A2:A7,{"A","B"},0))),--(B2:B7="Y"),C2:C7)
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,507
Members
452,917
Latest member
MrsMSalt

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