+ Reply to Thread
Results 1 to 5 of 5

Add future date to cell

  1. #1
    Registered User
    Join Date
    06-29-2006
    Posts
    42

    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!

    Please Login or Register  to view this content.

  2. #2
    AP
    Guest

    Re: 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. #3
    AP
    Guest

    Re: 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. #4
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote
    in message news:[email protected]...
    >
    > 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. #5
    Registered User
    Join Date
    06-29-2006
    Posts
    42
    That worked great guys! Thanks so much for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1