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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

T. Valko

Well-known Member
Joined
May 9, 2009
Messages
16,623
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")
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,772
Or you could sum them based on date and year, something like this:
=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2011),(B1:B100))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,301
Messages
5,836,493
Members
430,436
Latest member
fefenouil

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