Trying to SUM with Multiple criteria

Ignition1

New Member
Joined
Feb 22, 2011
Messages
49
Hi

I have 2 columns on Sheet 1 -

Column A

BSE
EST
NWD
BSE
MNS
BSE

etc

Column B

01/02/2011
01/02/2008
08/06/2012

(etc...various dates)

Column C

2100
1292
1828
1822

(etc...various values)

What I want to do is SUM the values in column C that are BSE and equal to or before a certain date which is in cell D56 (the date in the cell is 01/02/2011 and is formatted to be date).

For example this is one I've tried -

SUM(IF(AND(A1:A50="BSE", B1:B50<=D56)),C1:C5)

This seems like a simple task, maybe I'm just being slow...
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

SUMPRODUCT(--(A1:A50="BSE"),--(B1:B50<=D56),C1:C50)
 

Ignition1

New Member
Joined
Feb 22, 2011
Messages
49

ADVERTISEMENT

Dammit - returned a #VALUE error.

So this is what I put in -

=SUMPRODUCT(--('BNI All Prospects - REFERENCE'!B2:B1016=DATA!A2), --('BNI All Prospects - REFERENCE'!J2:J1020<=DATA!B53), 'BNI All Prospects - REFERENCE'!H2:H1021)

I should start being exact now -

BNI All Prospects - REFERENCE sheet has the NWD, BSE etc. J2:Jxxx has the dates, DATA sheet B53 has the date I want to find equal or before than.

H2:Hxx is the Gross Income values.

What could've returned the VALUE? Should I check all the rows to make sure they are all numbers etc?
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
The ranges all have to be the same number of rows.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092

ADVERTISEMENT

Each argument must have the same number of rows. You have:

B2:B1016
J2:J1020
H2:H1021
 

Ignition1

New Member
Joined
Feb 22, 2011
Messages
49
Ahh...thanks very much!

Solved.

Edit - Just out of curiosity - why did I have to put in the -- between the arguments?
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,123,040
Messages
5,599,456
Members
414,312
Latest member
mikefire911

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