+ Reply to Thread
Results 1 to 6 of 6

If cell A1 already contains a value don't update timestamp in B1

  1. #1
    Registered User
    Join Date
    08-17-2008
    Location
    UK
    MS-Off Ver
    Office Professional 2003 & 2010
    Posts
    11

    Question If cell A1 already contains a value don't update timestamp in B1

    Hi all,

    I have a problem I can't get my head around so I'm hoping you can help please?

    I have a drop-down on each row in column A with a range of stages such as "Await Reply", "More Info Requested" etc.
    I want column B to add a timestamp with Value = Now() when the first status is chosen in A, but I want B to ignore any further status updates to A (in order to always show the very first time a record is touched).

    At present, the line of code I am using is
    If ActiveCell.Value >= 0 Then ActiveCell.Offset(O,1).Value = Now()
    however this populates column B the first time A is updated, but also every time the status changes thereafter...

    Can someone please provide the code I need to achieve this please?

    Many thanks,
    Steve
    Last edited by BEERCAN; 11-25-2011 at 01:26 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: If cell A1 already contains a value don't update timestamp in B1

    change Now into Date

    If ActiveCell.Value >= 0 Then ActiveCell.Offset(O,1).Value = Date
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    08-17-2008
    Location
    UK
    MS-Off Ver
    Office Professional 2003 & 2010
    Posts
    11

    Re: If cell A1 already contains a value don't update timestamp in B1

    Thanks, sorry I should have explained the status can be updated on different days so unfortunately "Date" won't solve what I need...
    Regards
    Steve

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: If cell A1 already contains a value don't update timestamp in B1

    You can put a condition, stating that if activecell.offset(0,1) is not "", then dont update, else update.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: If cell A1 already contains a value don't update timestamp in B1

    try this
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-17-2008
    Location
    UK
    MS-Off Ver
    Office Professional 2003 & 2010
    Posts
    11

    Re: If cell A1 already contains a value don't update timestamp in B1

    Thank you - that worked great!

    Thanks!

+ 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