Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Performing date functions after getting cell address

I have two columns in a sheet, approx 1000 rows. A1:A1000 contain the
purchase date (i.e. 1/1/2000). I need to have B1:1000 display the date 3
years from the purchase date. I do not want to add this in manually for each
column, so I was hoping there was a way to do something like
=date(year(address(row(), column()-1, 4) +3, month(address(row(), column()-1,
4), day(address(row(), column()-1, 4)).

In my view, this looks at the year, month, and day for each cell that is in
the same row that formula is, and one column to the left. it adds 3 years,
and displays the same month and day value.

I think I'm close to getting it, but the function errors out.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Performing date functions after getting cell address

If the date was 2/29/2008 what date should be returned after adding 3 years?

If the correct result should be 3/1/2011 use this:

=DATE(YEAR(A1)+3,MONTH(A1),DAY(A1))

If the correct result should be 2/28/2011 use this:

=EDATE(A1,36)

Format as Date

Note that the EDATE function requires the Analysis ToolPak Add-in in
versions of Excel prior to Excel 2007.

--
Biff
Microsoft Excel MVP


"rstasiunas" wrote in message
...
I have two columns in a sheet, approx 1000 rows. A1:A1000 contain the
purchase date (i.e. 1/1/2000). I need to have B1:1000 display the date 3
years from the purchase date. I do not want to add this in manually for
each
column, so I was hoping there was a way to do something like
=date(year(address(row(), column()-1, 4) +3, month(address(row(),
column()-1,
4), day(address(row(), column()-1, 4)).

In my view, this looks at the year, month, and day for each cell that is
in
the same row that formula is, and one column to the left. it adds 3
years,
and displays the same month and day value.

I think I'm close to getting it, but the function errors out.



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
Performing arithmetic functions to cells with number and text Arithmetic functions with embedded text Excel Discussion (Misc queries) 4 May 15th 07 03:36 PM
Cell Size Between Worksheets when performing a copy and paste Kara Excel Discussion (Misc queries) 1 October 27th 06 04:08 AM
Protected cell performing hyperlink SAP PoD Excel Discussion (Misc queries) 2 August 22nd 06 08:47 AM
Performing Multiple Functions in a Column dhoward via OfficeKB.com Excel Worksheet Functions 2 June 23rd 06 04:25 PM
Replace part of link address in a cell with a value(date) from ano Hakan Excel Discussion (Misc queries) 0 July 20th 05 12:39 PM


All times are GMT +1. The time now is 09:40 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"