+ Reply to Thread
Results 1 to 5 of 5

Help for adding static date in column B on import/pasting of data in Column A

  1. #1
    Registered User
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    15

    Lightbulb Help for adding static date in column B on import/pasting of data in Column A

    I am new to the VBA world and will really appreciate if you can help me with a VBA code that allows the following -
    1. Checks for non-blank cells in the worksheet column B
    2. Adds a static date for non-blank cells in column A in the corresponding row.

    The current VBA codes on the forum allow the insertion of date for non-blank cell but only when data is keyed into the target cell and NOT when data is pasted or imported into the worksheet. I need a macro that not only inserts a static date in column A when data is entered into a cell in column B but also runs across a cell range in column B and inserts static date in column A for instances of data import and pastes.

    Any help will be highly appreciated.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Help for adding static date in column B on import/pasting of data in Column A

    which static date are you looking to be inserted, today's date?
    If you like my contribution click the star icon!

  3. #3
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Help for adding static date in column B on import/pasting of data in Column A

    Try

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help for adding static date in column B on import/pasting of data in Column A

    Hi and thanks a ton for the expedient revert!
    It works like a charm with a minor edit of replacing Now() with DateValue(Now)) because i needed a STATIC date. with Now() alone, the date updates to system date for all past entries when workbook is reopened.
    THanks again!

    Parijaat

  5. #5
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Help for adding static date in column B on import/pasting of data in Column A

    I do not think you are correct about the update you made. The value of Now() is assigned to the value of the Cell not as a formula, hence there is no subsequent update when the workbook is opened. But anyway, happy to have helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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