Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Dates (Months)

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Ok Fellas I have a question.
On an excel sheet, cel A1 I have the following date 10/30/00
I would like cel B1 to display a date three months later 1/30/01
I'm stuck. X-)
Thanks in advance.
 
Use the function DateAdd, and use the "m" switch.

Try
Code:
DateAdd("m", 3, A1)
. My Excel as atrociuos so putting A1 where the date to be added to should go might not work, but you get the idea.

james :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Perhaps I shoudl've been more specific on my question.

Cell a1 will always be an empty cell untill user enters a date.
Cell b1 will always reflect a date three months later from entered date on cell a1.
I don't know what date will be entered on cell a1.
 

I'm sorry James, but this =DateAdd("m", 3, A1) is not working. I keep getting #name? on B1. What am I doing wrong....
 
Make sure that the cell B1 is formatted as a DATE.
 
Thank you all for your help.
I found the answer I was looking for.
Here's the example:

Cell A1 is blank, when user enters a date into A1
Cell B1 will show a date 3 months later
here's the code that goes into cell B1:

=EDATE(A1,3)
This will increase the CELL A1 input by 3 months
Thank you all
 
Cool, Jr. If you're using similar functions, you could always do something like:

=if(isblank(a1),"",DateAdd("m", 3, A1))


techsupportgirl@home.com
 
Yeah Thanks man, I format lost of paper forms into excel for company use. Thanks for your help tho B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top