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

#### drom

##### Active Member

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

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

#### mart37

##### Well-known Member
=SUMPRODUCT((LEFT(AColAAA;2)={"ND"\"0%"})*ColBBB)

Replies
4
Views
115
Replies
15
Views
102
Replies
2
Views
337
Replies
5
Views
360
Replies
1
Views
55

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.

### Which adblocker are you using?

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

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