Sum formula help

erniepoe

Active Member
Joined
Oct 23, 2006
Messages
380
Office Version
  1. 365
Platform
  1. Windows
Hi all,

So I'm trying to add the values of columns N and U when both columns O and V have a date value from July, 2011.


I have the following CSE formula, but it's still resulting in the #Value error. I think that I'm close, but if anyone could nudge me in the correct direction, I'd be most appreciative.



=SUM((O1:O81>=7/1/11)*(O1:O81<7/31/11)*(V1:V81>=7/1/11)*(V1:V81<7/31/11)*(N1:N81)*(U1:U81))
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
As a tip, store the 2 dates in 2 separate cells say A1 and A2. Then you have no issues with dates in your formula (that's where it breaks down).

=SUM((O1:O81>=$A$1)*(O1:O81<$B$1)*(V1:V81>=$A$1)*(V1:V81<$B$1)*(N1:N81)*(U1:U81))
 
Upvote 0
In addition to wigi's comments...

The reason it fails the way you have the dates is because...

(O1:O81>=7/1/11)
This is being read like
Is the value in Column O Greater than or equal to 7 devided by 1 devided by 11

To make it work you could do a few things..
1. Put the date in a cell as wigi suggests
2. (O1:O81>="7/1/11"+0)
3. (O1:O81>=DATE(2011,7,1))

Hope that helps.
 
Upvote 0
In addition to wigi's comments...

The reason it fails the way you have the dates is because...

(O1:O81>=7/1/11)
This is being read like
Is the value in Column O Greater than or equal to 7 devided by 1 devided by 11

To make it work you could do a few things..
1. Put the date in a cell as wigi suggests
2. (O1:O81>="7/1/11"+0)
3. (O1:O81>=DATE(2011,7,1))

Hope that helps.

True Jonmo. The DATEVALUE function is another candidate here.
 
Upvote 0
Thanks Jon,

So I now have


=SUM((O1:O81>=DATE(2011,7,1))*(O1:O81<DATE(2011,7,31))*(V1:V81>=DATE(2011,7,1))*(V1:V81<DATE(2011,7,31))*(N1:N81)*(U1:U81))


entered as a CSE, but still getting the #Value error. As it turns out, I want it to sum when EITHER column is in July 2011, not both as I accidentally stated before. Does this change the formula at all?
 
Upvote 0
whoops, formula was


=SUM((O1:O81>=DATE(2011,7,1))*(O1:O81<DATE(2011,7,31))*(V1:V81>=DATE(2011,7,1))*(V1:V81<DATE(2011,7,31))*(N1:N81)*(U1:U81))
 
Upvote 0
=SUM((O1:O81>=DATE(2011,7,1))*(O1:O81<DATE(2011,7,31))*(V1:V81>=DATE(2011,7,1))*(V1:V81<DATE(2011,7,31))*(N1:N81)*(U1:U81))


trying this again....
 
Upvote 0
=SUM((O1:O81>=DATE(2011,7,1))*(O1:O81<DATE(2011,7,31))*(V1:V81>=DATE(2011,7,1))*(V1:V81<DATE(2011,7,31))*(N1:N81)*(U1:U81))


Why is this not showing up?
 
Upvote 0
I give up. It pastes into this box the way I want, but then shows up as only a partial formula. What the.....?


Today is not my day.




SUM((O1:O81>= DATE (2011,7,1))*(O1:O81 < DATE(2011,7,31))*(V1:V81 >= DATE (2011,7,1))*(V1:V81< DATE (2011,7,31))*(N1:N81)*(U1:U81))


Edit: ok there we go
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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