#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 175
Default year - 1

Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default year - 1

=date(year(a1)-1,month(a1),day(a1))

It'll work for almost every date except the leapyear dates (Feb 29, 2008 won't
give Feb 29, 2007).

alvin Kuiper wrote:

Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default year - 1

=DATE(YEAR(A1)-1,MONTH(A1),DAY(A1))

Just be careful about leap years.
--
Gary''s Student - gsnu200853


"alvin Kuiper" wrote:

Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 175
Default year - 1


Thanks


Alvin
"Dave Peterson" skrev:

=date(year(a1)-1,month(a1),day(a1))

It'll work for almost every date except the leapyear dates (Feb 29, 2008 won't
give Feb 29, 2007).

alvin Kuiper wrote:

Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default year - 1

Hi.

=EDATE(A1,-12)

Note that this will move a Feb 29 to Feb 28.

Dana DeLouis


alvin Kuiper wrote:
Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 293
Default year - 1

Hi Alvin,

Here's one that'll handle leap years:
=MIN(DATE(YEAR(A1),MONTH(A1)-{12,11},DAY(A1)*{1,0}))

--
Cheers
macropod
[Microsoft MVP - Word]


"alvin Kuiper" wrote in message ...
Hi

Is there a way in a worksheet - Functions where i can
take a cell value (date) and make it a year less
like 01-11-2009 (danish date) shall be 01-11-2008

I can in VB, but can't find it in a waotksheet

alvin

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
convert day of year to numeric value format year+day in 4 digits Kaaren Excel Worksheet Functions 3 February 7th 09 08:37 PM
How do I crate a function for week of year + year in same cell. patty ann Excel Worksheet Functions 1 March 16th 08 06:34 PM
Combination Graph with current year and prior year sales JanW Charts and Charting in Excel 2 April 5th 07 09:20 PM
how to calculate $1000/year at 5% for 25 years showing each year HELP! Setting up and Configuration of Excel 0 July 25th 06 12:58 AM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM


All times are GMT +1. The time now is 01:49 PM.

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

About Us

"It's about Microsoft Excel"