+ Reply to Thread
Results 1 to 14 of 14

Date stamp when cell changes for a number of rows.

  1. #1
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Date stamp when cell changes for a number of rows.

    Hi All,

    I have a problem that has been nearly answered on a number of threads, just with a slight subtle difference.

    I want to add a date stamp above a cell when the value in that cell changes, this will be for a number of alternate rows. For example.

    Row 1: Date 1 Date 2 Date 3
    Row 2: Change 1 Change 2 Change 3
    Row 3: Date x Date y Date z
    Row 4: Change x Change y Change z

    (dates appear in rows 1 and 3 when a change is made in 2 /4)

    This is to be done for around 600 rows. I have found this VBA code that seems to be along the rite lines but dont know how to apply it to a large number of alternating rows.

    Please Login or Register  to view this content.
    Any help would be great!
    Last edited by kcaseykc; 06-10-2015 at 12:12 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    Hi, the code you found is almost ready :-)
    try :
    Please Login or Register  to view this content.
    PS. note how readability of the code improved after applying code tags and follow this and othe requirements of our http://www.excelforum.com/forum-rule...rum-rules.html (please edit your post above and use code tags there too).
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    Thank you so much for the crazy quick response, very glad i joined the forum.

    However i realise i was unclear (didnt understand myself) about what i put in initially. What you have done answers my question perfectly but i actually need something slightly difference. In the cells where the changes happen there is currently a formula drawing data from elsewhere, therefore chages elsewhere do change the content in these cells but they are effectively unchanged as the formula is unchanged. Is there a way to adapt this so it reacts changes in output as opposed to changes.

    Also can we start maping the changs on rows 3,4 ect as opposed 2,4. have had aplay around but cant seem to get it!

    Once again thanks for any help!

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    Not that easy, because calculate event handler has no Target argument - we dont know what has been changed.
    of course one can make an archieve copy of the range we focus on, and then after calculation compare currrent state of this copy and present values in cells. or may be your input data (input for formula) is reasonably structured - then you can monitor this data with SheetChange eveny and write change date in appropriate cell.

    Anyway probably standard exempt from forum rules (again I kindly ask you to edit first post and use code tags) would be appropriate:

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Last edited by Kaper; 06-10-2015 at 12:09 PM.

  5. #5
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    date stamp example.xlsxdate stamp example.xlsx

    Ah i thought it might be a bit of an issue, im not sure if its possible somehow just with standard excel formula?

    The attachment (if ive done it properly) is something ive transferred from another workbook as it was quite large.

    Basically i've got a formula in the second tab on rows 3,5,7 etc drawing out comments from specific boxes on sheet 1 (a master sheet all info is put into) when they are split by '##'. My aim is to be able to show when these comments were added.

    Once again thanks for the help and familiarizing me with site protocol, i think im going to need it!

    Thanks

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    I probably dont follow this. To help I shall understand, what triggers some action occuring in the workbook. Where is source of data to be processed in this action, and where the output shall be inserted.

  7. #7
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    Yeah sorry i realise the last link was a bit messy. Ive cleaned it up now (i hope!). Basically anything in master tracker data is going to determine whats in sheet 2 via formulas already on the sheet. Hope this makes things clearer!

    ATTACH]400485[/ATTACH]
    Attached Files Attached Files

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    Next attempt based on (As I understood) sample workbook:

    Please Login or Register  to view this content.
    This code is in MAster ... worksheet code . Rightclick on this worksheet tab and select "edit code" to see it in attached file.
    Note my local date foremat I used (2015-06-12) and adjust it to your local one in this row:
    Please Login or Register  to view this content.
    "mm/dd/yyyy" or any other which is suitable

    change something in even row of column B in Master sheet. Add something after ## to existing data etc. Shortly: play and check different options to test how it works.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    Hi Again, thanks for that i was able to adapt it and very nearly thought i had it all solved. However i have just noticed a big flaw in it. The date above the entry is the same for the entire row. So if i made a note today it would have todays date above it (what i want), but if i go and add to that note tomorrow the date for that note and also yesterdays note will change to the date when the last note was made (not what i want). Sounds like a tongue twister but hope i've explained it correctly.
    Ive copied in the code i am currently using below, i had to change it as the text was being run from consecutive rows on the master sheet, not every other row.

    Please Login or Register  to view this content.
    If theres a way to 'lock' the dates in so they wont change when a new note is added onto the end then we really would have this problem solved once and for all!

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    Quote Originally Posted by kcaseykc View Post
    If theres a way to 'lock' the dates in so they wont change when a new note is added onto the end then we really would have this problem solved once and for all!
    well, it works that way. I downloaded a file from my previous post, edited B8 in Master sheet (was reading anna) to anna##maria and presto: in sheet2 in B7:C8 I got:
    HTML Code: 
    So I probably do not understand your point. One thing to note - nothing changed in previous content of the cell - just added double hash and new part of text

  11. #11
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    Ok im a little confused. Your one seems to be doing the trick but my slight adaption isn't. I have attached a sample of what im using here to show you what i mean. Once i add a ## and note to an already existing note the Notes view tab will update but change all previously made notes dates' on that line to the date the last note was made, unlike your rather perfect example. As far as i can tell the codes used are very similar so im not sure what im missing! For quick reference here is the code im using.
    Please Login or Register  to view this content.
    Example 31.xlsm

    Once again thanks for the patience!

  12. #12
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    1) you tried to increase the distance between lines in Notes View, but you missed *2 while checking:
    Please Login or Register  to view this content.
    2) note that adding new note not after just "##" but after " ## " leads to the above test being true also for last "in users view unchanged" note (the one before new added one), so for example if in your row 6 if you have
    |Note 1 ## Note 2|
    and add Note 4 this way:
    |Note 1 ## Note 2 ## Note 4|
    then in your Notes View
    | Note 2|
    changes into
    | Note 2 |
    (extra space after)

    Proposed solution (geting rid of leading space too):
    Please Login or Register  to view this content.
    Last edited by Kaper; 06-22-2015 at 02:27 AM.

  13. #13
    Registered User
    Join Date
    05-22-2015
    Location
    lodon
    MS-Off Ver
    2013
    Posts
    13

    Re: Date stamp when cell changes for a number of rows.

    Thanks, ive got it all working now, for some reason it works when i changed the date format back to your yyyy-mm-dd, not too sure why but i'll take it!

    Thanks so much for the help.

  14. #14
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Date stamp when cell changes for a number of rows.

    in UK yyyy-mm-dd seems to follow BS ISO 8601:2004 so may be this is the reason.

+ 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. Replies: 6
    Last Post: 02-08-2013, 08:29 AM
  2. [SOLVED] Need Date Stamp when any cell in that row changes
    By MDPlanner in forum Excel General
    Replies: 4
    Last Post: 09-26-2012, 07:19 PM
  3. Date Stamp based on cell value
    By RedWrangler in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-05-2012, 12:09 PM
  4. How Change the Date \ Time Stamp of a file to a number ? (EXCEL VBA)
    By nawaralobaidi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 12:23 PM
  5. [SOLVED] Create a button that will date stamp todays date in a cell
    By Tom Meacham in forum Excel General
    Replies: 3
    Last Post: 01-10-2006, 09:10 PM

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