Is there a way I can remove the day from a date reference?

Rocket28

Board Regular
Joined
Jan 23, 2009
Messages
60
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
Is there a way I can remove the day from a date reference?<o:p></o:p>
<o:p></o:p>
I have a spreadsheet set up to total the costs for certain suppliers in a given month.<o:p></o:p>
<o:p></o:p>
however, the data i am able to get from my system shows the date as day / month / year. I want my formula to sum up any costs in the month of a certain year.<o:p></o:p>
<o:p></o:p>
Is there anything I can do to the data downloaded to show jsut the month and year? I can obviously format it, but the underlying data is still there, so it doesn’t pick up that it is the information that I require.<o:p></o:p>
<o:p></o:p>
Thanks!<o:p></o:p>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
Is there a way I can remove the day from a date reference?<o:p></o:p>
<o:p></o:p>
I have a spreadsheet set up to total the costs for certain suppliers in a given month.<o:p></o:p>
<o:p></o:p>
however, the data i am able to get from my system shows the date as day / month / year. I want my formula to sum up any costs in the month of a certain year.<o:p></o:p>
<o:p></o:p>
Is there anything I can do to the data downloaded to show jsut the month and year? I can obviously format it, but the underlying data is still there, so it doesn’t pick up that it is the information that I require.<o:p></o:p>
<o:p></o:p>
Thanks!<o:p></o:p>
You can use another cell that returns only the month and year.

If A1 = some date like 25/3/2011 then what result do you want?

This will return the TEXT string Mar 2011.

=TEXT(A1,"mmm yyyy")
 
Upvote 0
Or you could sum them based on date and year, something like this:
=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2011),(B1:B100))
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,936
Latest member
almerpogi

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