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>
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

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,764
Or you could sum them based on date and year, something like this:
=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2011),(B1:B100))
 

Watch MrExcel Video

Forum statistics

Threads
1,109,380
Messages
5,528,366
Members
409,817
Latest member
JiNXX9500

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top