Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lucy
 
Posts: n/a
Default Changing dates entered in 2005 to previous years

I have a three spreadsheets. Each represents a different year and each has
one column with different dates within that year.
Unfortunately I entered all of these dates in the default date format ie
7-jan and did not enter a year. I now need to ensure the year is present in
the date formula in some way ie 07/01/04 or any format that shows the year.
Is there a quick way of changing this rather than retyping all.
--
lucy
  #2   Report Post  
John Michl
 
Posts: n/a
Default

To determine the year of the date, change the format (Format | Cells |
Number ) to one of the formats that shows the date. If you created the
dates this year, they would have defaulted to 2005. Since dates are
really just serial numbers, you can do simple math with them like
subtracting 365 to get the same date as last year. If you expect a
leap year to cause problems, you can use some of the Date functions to
extract the month and day from the serial number and combine it with
the appropriate year.

Hope that helps. Let me know if you need more details.

- John Michl

  #3   Report Post  
lucy
 
Posts: n/a
Default

Eek - feeling a bit stupid here - maths never being my strong point! OK I've
changed the format and as you say all the 2004 dates default to 2004. How do
I get the whole column to subtract the contents of each cell by 365?
Extremely grateful if you can help...
--
lucy


"John Michl" wrote:

To determine the year of the date, change the format (Format | Cells |
Number ) to one of the formats that shows the date. If you created the
dates this year, they would have defaulted to 2005. Since dates are
really just serial numbers, you can do simple math with them like
subtracting 365 to get the same date as last year. If you expect a
leap year to cause problems, you can use some of the Date functions to
extract the month and day from the serial number and combine it with
the appropriate year.

Hope that helps. Let me know if you need more details.

- John Michl


  #4   Report Post  
lucy
 
Posts: n/a
Default

sorry should have said "all the 2004 dates default to 2005" ...
--
lucy


"lucy" wrote:

Eek - feeling a bit stupid here - maths never being my strong point! OK I've
changed the format and as you say all the 2004 dates default to 2004. How do
I get the whole column to subtract the contents of each cell by 365?
Extremely grateful if you can help...
--
lucy


"John Michl" wrote:

To determine the year of the date, change the format (Format | Cells |
Number ) to one of the formats that shows the date. If you created the
dates this year, they would have defaulted to 2005. Since dates are
really just serial numbers, you can do simple math with them like
subtracting 365 to get the same date as last year. If you expect a
leap year to cause problems, you can use some of the Date functions to
extract the month and day from the serial number and combine it with
the appropriate year.

Hope that helps. Let me know if you need more details.

- John Michl


  #5   Report Post  
bj
 
Posts: n/a
Default

try changing the date format in the cell. It may have automatically formated
with this years date.

If it did not You might try adding 38352 to all of the date values then
check whether it gives you the correct date.
"lucy" wrote:

I have a three spreadsheets. Each represents a different year and each has
one column with different dates within that year.
Unfortunately I entered all of these dates in the default date format ie
7-jan and did not enter a year. I now need to ensure the year is present in
the date formula in some way ie 07/01/04 or any format that shows the year.
Is there a quick way of changing this rather than retyping all.
--
lucy



  #6   Report Post  
lucy
 
Posts: n/a
Default

Thanks for replying. I think I may not have explained the problem well
enough. I've entered dates into all three spreadsheets (2002,2003,2004) in
the last two weeks, so when I change the format from 7-jan to one that
includes the year, it automatically assumes (not surprisingly) it's a date
that in year 2005. So I now need to go back to everything that's in the 2004
spreadsheet for example that currently says 7-jan or even 07/01/05 and ensure
that it somehow says 2004 at the end. Not fussy about which format though if
that's of any help.... Hope this explains it better. Dreading the thought
of a long retype!


--
lucy


"bj" wrote:

try changing the date format in the cell. It may have automatically formated
with this years date.

If it did not You might try adding 38352 to all of the date values then
check whether it gives you the correct date.
"lucy" wrote:

I have a three spreadsheets. Each represents a different year and each has
one column with different dates within that year.
Unfortunately I entered all of these dates in the default date format ie
7-jan and did not enter a year. I now need to ensure the year is present in
the date formula in some way ie 07/01/04 or any format that shows the year.
Is there a quick way of changing this rather than retyping all.
--
lucy

  #7   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 26 Aug 2005 12:07:01 -0700, "lucy"
wrote:

I have a three spreadsheets. Each represents a different year and each has
one column with different dates within that year.
Unfortunately I entered all of these dates in the default date format ie
7-jan and did not enter a year. I now need to ensure the year is present in
the date formula in some way ie 07/01/04 or any format that shows the year.
Is there a quick way of changing this rather than retyping all.



It takes longer to type than to do.
First make a backup of your original data.

Assume your dates are in A2:An

1. In some unused column, row 2, let us say cell AA2, enter one of these
formulas:

=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))-
(MONTH(DATE(YEAR(A2)-1,MONTH(A2),
DAY(A2)))<MONTH(A2))

or, if you have the analysis tool pak installed:

=EDATE(A2,-12)

The above will subtract one year (and adjust for leap year, if necessary).

To subtract more than one year, in formula one change the '1' to the number of
years you wish to subtract; or in formula 2 multiply the '12' by the number of
years you wish to subtract.

2. Copy/drag the formula down to AAn.

3. With AA2:AAn selected:
Edit/Copy

4. Select cell A2
5. Edit/Paste Special Values


--ron
  #8   Report Post  
lucy
 
Posts: n/a
Default

bingo!!!! Fab!!!! No retyping for me!!! Very Happy and unbelievably
grateful!!! First time I've ever used this site. Thank you, thank you thank
you :-)
--
lucy


"Ron Rosenfeld" wrote:

On Fri, 26 Aug 2005 12:07:01 -0700, "lucy"
wrote:

I have a three spreadsheets. Each represents a different year and each has
one column with different dates within that year.
Unfortunately I entered all of these dates in the default date format ie
7-jan and did not enter a year. I now need to ensure the year is present in
the date formula in some way ie 07/01/04 or any format that shows the year.
Is there a quick way of changing this rather than retyping all.



It takes longer to type than to do.
First make a backup of your original data.

Assume your dates are in A2:An

1. In some unused column, row 2, let us say cell AA2, enter one of these
formulas:

=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))-
(MONTH(DATE(YEAR(A2)-1,MONTH(A2),
DAY(A2)))<MONTH(A2))

or, if you have the analysis tool pak installed:

=EDATE(A2,-12)

The above will subtract one year (and adjust for leap year, if necessary).

To subtract more than one year, in formula one change the '1' to the number of
years you wish to subtract; or in formula 2 multiply the '12' by the number of
years you wish to subtract.

2. Copy/drag the formula down to AAn.

3. With AA2:AAn selected:
Edit/Copy

4. Select cell A2
5. Edit/Paste Special Values


--ron

  #9   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 26 Aug 2005 13:28:03 -0700, "lucy"
wrote:

bingo!!!! Fab!!!! No retyping for me!!! Very Happy and unbelievably
grateful!!! First time I've ever used this site. Thank you, thank you thank
you :-)
--
lucy


You're welcome. And thanks for the enthusiastic feedback!


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Calculations Bruce Excel Worksheet Functions 11 May 19th 05 01:09 AM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
How do I forecast monthly and annual totals from previous year's . Jeff Hart Excel Worksheet Functions 0 April 1st 05 07:19 PM
Sumif Linking to Another Workbook error #VALUE! Tunde Excel Discussion (Misc queries) 16 March 4th 05 03:02 AM
Data in column predetermined by what has been entered in previous zan123 Excel Discussion (Misc queries) 6 February 23rd 05 08:03 PM


All times are GMT +1. The time now is 01:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"