Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add future date to cell


I want to have a future date (30 days from today’s date) added to a cell
in column A only if that cell is already blank and column N has an “O”
in that same row. Here is the code that I have right now, and it works
to add a value based on the conditions that I just described. I just
don’t know how to get it to add a date to that is 30 days in advance of
today’s date. Thanks for any help!


Code:
--------------------
If Me.Cells(.Row, "N").Value = "O" And Me.Cells(.Row, "A").Value = "" Then
Me.Cells(.Row, "A").Value = "1"
End If
--------------------


--
chris46521
------------------------------------------------------------------------
chris46521's Profile: http://www.excelforum.com/member.php...o&userid=35909
View this thread: http://www.excelforum.com/showthread...hreadid=567160

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Add future date to cell

Try Now() + 30



AP
www.megacrosstab.com

chris46521 wrote:
I want to have a future date (30 days from today's date) added to a cell
in column A only if that cell is already blank and column N has an "O"
in that same row. Here is the code that I have right now, and it works
to add a value based on the conditions that I just described. I just
don't know how to get it to add a date to that is 30 days in advance of
today's date. Thanks for any help!


Code:
--------------------
If Me.Cells(.Row, "N").Value = "O" And Me.Cells(.Row, "A").Value = "" Then
Me.Cells(.Row, "A").Value = "1"
End If
--------------------


--
chris46521
------------------------------------------------------------------------
chris46521's Profile: http://www.excelforum.com/member.php...o&userid=35909
View this thread: http://www.excelforum.com/showthread...hreadid=567160


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Add future date to cell

or TODAY() + 30 if you dont need the time included

AP
www.megacrosstab.com
chris46521 wrote:
I want to have a future date (30 days from today's date) added to a cell
in column A only if that cell is already blank and column N has an "O"
in that same row. Here is the code that I have right now, and it works
to add a value based on the conditions that I just described. I just
don't know how to get it to add a date to that is 30 days in advance of
today's date. Thanks for any help!


Code:
--------------------
If Me.Cells(.Row, "N").Value = "O" And Me.Cells(.Row, "A").Value = "" Then
Me.Cells(.Row, "A").Value = "1"
End If
--------------------


--
chris46521
------------------------------------------------------------------------
chris46521's Profile: http://www.excelforum.com/member.php...o&userid=35909
View this thread: http://www.excelforum.com/showthread...hreadid=567160


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Add future date to cell

If Me.Cells(.Row, "N").Value = "O" And Me.Cells(.Row, "A").Value = ""
Then
Me.Cells(.Row, "A").Value = Date + 30
End If


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"chris46521" wrote
in message ...

I want to have a future date (30 days from today’s date) added to a cell
in column A only if that cell is already blank and column N has an “O”
in that same row. Here is the code that I have right now, and it works
to add a value based on the conditions that I just described. I just
don’t know how to get it to add a date to that is 30 days in advance of
today’s date. Thanks for any help!


Code:
--------------------
If Me.Cells(.Row, "N").Value = "O" And Me.Cells(.Row, "A").Value = ""

Then
Me.Cells(.Row, "A").Value = "1"
End If
--------------------


--
chris46521
------------------------------------------------------------------------
chris46521's Profile:

http://www.excelforum.com/member.php...o&userid=35909
View this thread: http://www.excelforum.com/showthread...hreadid=567160



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add future date to cell


That worked great guys! Thanks so much for your help!


--
chris46521
------------------------------------------------------------------------
chris46521's Profile: http://www.excelforum.com/member.php...o&userid=35909
View this thread: http://www.excelforum.com/showthread...hreadid=567160

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
save as future date eg expected delivery date ryan Excel Discussion (Misc queries) 0 June 21st 07 03:35 PM
Tricky Date calculation: How to calculate a future date [email protected] Excel Discussion (Misc queries) 9 August 11th 06 04:24 AM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 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
How do I change the value in cell based on a future date John W Excel Discussion (Misc queries) 2 December 21st 04 01:27 AM


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