+ Reply to Thread
Results 1 to 11 of 11

Record Date of Data Entry Except When Blank

  1. #1
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Record Date of Data Entry Except When Blank

    Hi, I have a bit of code here that records the current Date/Time in Column A when data is input into Column B. This works great except...it records a D/T stamp even if the data is blank (""). I need to modify it so it will not record a D/T stamp when the data is blank (""). I am somewhat new to VBA and tried for over an hour but to no avail, so any help and guidance is appreciated.

    Ken

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by majime01; 03-07-2016 at 08:26 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    Try adding the below line before your "Set rInt...." line:

    Please Login or Register  to view this content.
    BSB

  3. #3
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Record Date of Data Entry Except When Blank

    Hey BSB, thank you for the reply, I added your line and got a Type Mismatch error.

    I've tried to attach demo spreadsheet, but attachments button (next to smiley face) is inop at this time.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    You got the type mismatch err when you were entering data into a single cell or when you were clearing multiple cells?

    I only get it during the latter.

    BSB

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    To attach a file:

    Click on GO ADVANCED and then scroll down to Manage Attachements to open the upload window.

    View Pic

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    Does this work for you?

    Please Login or Register  to view this content.
    BSB

  7. #7
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Record Date of Data Entry Except When Blank

    BSB,
    The code does not record the date. I followed your instructions for adding the attachment, thank you. Please take a look. I am using the ENTER button on the sheet to copy and clear.
    Thank you for your help thus far. I think we are close.
    Ken

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    Try this:

    Please Login or Register  to view this content.
    BSB

  9. #9
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Record Date of Data Entry Except When Blank

    BSB,

    Your code works if data is directly input into Column B, but does not record the date if I use the simple Macro to cut and paste data into Column B from another location. Any ideas?
    I appreciate it.

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Record Date of Data Entry Except When Blank

    Could we see the code you're using to paste the data in?

    BSB

  11. #11
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Record Date of Data Entry Except When Blank

    of course. here it is:

    Please Login or Register  to view this content.
    it is in the demo spreadsheet. i have attached again if that helps.

    Thank you
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cancel Data Entry if text box is blank
    By SeanBaird in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-10-2015, 08:39 PM
  2. [SOLVED] [B]Macro for updation of record/ Data Entry[/B]
    By tameen42 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-20-2014, 09:48 AM
  3. Record date for data entry
    By wombat71 in forum Excel General
    Replies: 5
    Last Post: 05-26-2013, 05:08 PM
  4. VBA for copy record to sellected 2 sheet & clear entry sheet for new record
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2012, 10:54 PM
  5. Replies: 3
    Last Post: 03-20-2012, 04:26 PM
  6. How to leave Date formula cell blank until date entry??
    By NewbieDateFormatter in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-16-2011, 07:50 AM
  7. [SOLVED] data entry to next blank TextBox
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2005, 06:05 PM

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