Sum Values in a Column if other columns starst with 2 possibilities {"ND"."0%"}

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance

I have to columns names eg:
  • A2:A50 = ColAAA
  • B2:B50 = ColBBB
Both names ranges are dinamic anyway for my query does not matter

I would like to SUM the values in ColBBB if the cells in CoaAAA starts with possibilities:
  • ND
  • 0%
If I use this Formula:
=SUMPRODUCT(--(LEFT(ColAAA)={"ND","0%"})) I get 143
  • So actually 143 rows contain ND or 0%
  • If I filter on the row Source ColBBB I get a Sum 45000 after this filter
but when using:
=SUMPRODUCT(--(LEFT(ColAAA ,2)={"ND","0%"}),ColBBB )
I get a error
What am I doing wrong?

ps: in this Eg I only put two possibilities , In my job I have many posssibilities
This is why I can't use Sumproduct + SumProduct...
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
=SUMPRODUCT((LEFT(AColAAA;2)={"ND"\"0%"})*ColBBB)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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