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

drom

Active Member
Joined
Mar 20, 2005
Messages
445
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2011
  5. 2010
  6. 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...
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,058
Office Version
  1. 2016
Platform
  1. Windows
=SUMPRODUCT((LEFT(AColAAA;2)={"ND"\"0%"})*ColBBB)
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,127,443
Messages
5,624,806
Members
416,055
Latest member
EJGAJG

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
Top