+ Reply to Thread
Results 1 to 11 of 11

Date Stamp error

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Date Stamp error

    I am using the following macro to date stamp cells in F based on "Yes" in E.

    Please Login or Register  to view this content.
    When I simply type "Yes" in E i get the current date in F. This is exactly what I want to happen.

    Problem is when I do a mass update by either copying "Yes" from another cell and pasting it to multiple cells or selecting multiple cells and pressing delete, i get a debugging error and cannot figure out why.

    Any help would be greatly appreciated.
    Last edited by dagindi; 08-05-2010 at 06:02 PM.

  2. #2
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    I forgot to attach a sample of the sheet.
    Attached Files Attached Files

  3. #3
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Date Stamp error

    keep it simple
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    Trucker,

    Thanks for the response.

    While your solution is simpler then mine and it solves the issue of working with multiple cells at once, it doesn't do exactly what I need it to do.

    I only want the date to appear if "Yes" is entered in the column.

  5. #5
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    I have this code as well but again it covers the entire column range of E and will populate the date in F regardless of what is typed in E


    Please Login or Register  to view this content.

  6. #6
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Date Stamp error

    You can set And Target.Value = "Yes"
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    Better, but still getting a run time error 13 and type mismatch.

    See attached
    Attached Files Attached Files

  8. #8
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    "Bump no response"

  9. #9
    Registered User
    Join Date
    03-01-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Date Stamp error

    I tried you file and while I'm still quite the noob....I think I've fixed it somehow.

    Try this code instead of what you had before.
    Please Login or Register  to view this content.

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date Stamp error

    Perhaps you want something along the lines of:

    Please Login or Register  to view this content.
    still not 100% watertight but I suspect does what you want - though not clear what should happen if something non-blank but non-YES is entered into Col E

  11. #11
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Date Stamp error

    DonkeyOte,

    Well Done!!

    You say it might not be "still not 100% watertight" but if the Titanic had this code it would still be afloat...

    After studying your code and getting a basic understanding of how it works I was able to modify it to the following:

    Please Login or Register  to view this content.
    So now when I add any comment in Column A, such as "Work", "Personal", "Travel" etc I get the date it was entered or "started".

    Column E gets a "Yes" once what ever the task/question is gets a response or completed.

    Column F gives me a time elapsed total.

    Once again thank you so much for solving this problem.

    Pats on the back for everyone!!!

+ 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