LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
M Smith
 
Posts: n/a
Default Using date function in an if statement

I need help using the date function in an if statement. I want cell A1 to
display a date 30 days ahead of the date typed into cell B1. I got this to
work using the Date funtion in cell A1. =DATE(YEAR(B1), MONTH(B1),
DAY(B1)+30)
However, if cell B1 is blank, I want cell A1 to be blank. If I use the
formula above cell A1 displays "1/30/1900". I tried using an if statement
but it bombs because of the commas in the DATE function
=IF(B1="","DATE(YEAR(B1), MONTH(B1), DAY(B1)+30)",""). Can anyone help me
with this.

I'm using Excel 2000 on Windows 2000.

Thanks


 
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
How do I get an IF statement to pull a date range?? Brooke Medvecky Excel Worksheet Functions 9 April 19th 06 08:48 PM
Is there a function to show future date taxmom Excel Worksheet Functions 2 March 4th 05 09:23 PM
Date function geza Excel Worksheet Functions 2 February 11th 05 04:15 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
Formula for date function Markitos Excel Worksheet Functions 15 November 10th 04 02:05 AM


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