SUM ROW BASED ON DATE

bpworker

New Member
Joined
Sep 2, 2002
Messages
11
I need help with figuring out what formula to use.

In cell A3 is where the date value is. In cells E3:M3 are where the values I need to sum are located. I would like to place a formula in N3 to sum E3:M3 if A3 has a certain month located in it's date. Example...12-08-02 or 12-Aug-02. If it does not have this particular month, do not want a sum. I have sent in a similar request for this before but it was a much larger range and could not get it to work.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi bpworker,

The forms of the dates you have given (with day first, month second) is not a standard form for inputting dates in Excel, although they can be displayed this way via custom date formatting. If this is the case (i.e., that Excel is recognizing them as date values, but displaying them in a non-standard format) then the following formula should work:

=IF(MONTH(A3)=8,SUM(E3:M3),"")

where the 8 represents a test for the month of August.

If on the other hand the dates you showed in your example have been entered as strings (e.g., with a leading apostrophe) so that Excel is not recognizing them as dates at all, then another approach is required. Let me know if this is the case and I'll give you the solution for this.
 
Upvote 0
Hi bpworker,

The forms of the dates you have given (with day first, month second) is not a standard form for inputting dates in Excel, although they can be displayed this way via custom date formatting. If this is the case (i.e., that Excel is recognizing them as date values, but displaying them in a non-standard format) then the following formula should work:

=IF(MONTH(A3)=8,SUM(E3:M3),"")

where the 8 represents a test for the month of August.

If on the other hand the dates you showed in your example have been entered as strings (e.g., with a leading apostrophe) so that Excel is not recognizing them as dates at all, then another approach is required. Let me know if this is the case and I'll give you the solution for this.
 
Upvote 0
On 2002-09-05 06:44, bpworker wrote:
I need help with figuring out what formula to use.

In cell A3 is where the date value is. In cells E3:M3 are where the values I need to sum are located. I would like to place a formula in N3 to sum E3:M3 if A3 has a certain month located in it's date. Example...12-08-02 or 12-Aug-02. If it does not have this particular month, do not want a sum. I have sent in a similar request for this before but it was a much larger range and could not get it to work.

I presume you're referring to

http://www.mrexcel.com/board/viewtopic.php?topic=20977&forum=2

Why don't you answer the question which I posted?
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

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