+ Reply to Thread
Results 1 to 14 of 14

Insert current date (static) when cell is clicked?

  1. #1
    Registered User
    Join Date
    01-27-2004
    Posts
    7

    Insert current date (static) when cell is clicked?

    Here is what I want to be able to do:

    I want to be able to simply click on a cell and the current date appear in that cell and remain there even after a save. Is there any way to do this? Thanks in advance!
    Last edited by floyd605; 03-18-2011 at 10:25 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Insert current date (static) when cell is clicked?

    Try this in the worksheet module
    Please Login or Register  to view this content.
    You will have to define the range it is to apply to, otherwise the sheet will be rendered all but useless
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Insert current date (static) when cell is clicked?

    Marcol, hat won't be static because you are entering the formula to the cell

    Please Login or Register  to view this content.
    Last edited by royUK; 03-18-2011 at 10:23 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Insert current date (static) when cell is clicked?

    Good point Roy!
    Please Login or Register  to view this content.

    Same comment as Post #2 still applies

  5. #5
    Registered User
    Join Date
    01-27-2004
    Posts
    7

    Re: Insert current date (static) when cell is clicked?

    Ok. Got that into the module. Now how do I apply it to certain cells in the worksheet? Sorry, I have no experience with working with these custom functions.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Insert current date (static) when cell is clicked?

    No problem, we are here to help you learn.

    What Cell(s) do you want to apply the rule to?
    Is it only on one sheet in the workbook?

  7. #7
    Registered User
    Join Date
    01-27-2004
    Posts
    7

    Re: Insert current date (static) when cell is clicked?

    Just finished a meeting and this project is no longer needed. Thanks so much for taking the time to help me with this anyway guys!

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Insert current date (static) when cell is clicked?

    Okay , but for future reference
    Please Login or Register  to view this content.

    This would then only work for Cell A2
    Sheet protection might also come into play, but that can be addressed later if ever required.

    Cheers

  9. #9
    Registered User
    Join Date
    01-27-2004
    Posts
    7

    Re: Insert current date (static) when cell is clicked?

    Thank you so much! I learned something today!

  10. #10
    Registered User
    Join Date
    10-28-2009
    Location
    Amritsar,Punjab
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Re: Insert current date (static) when cell is clicked?

    Thanks a lot for this code. Actually i was searching the same on excelforum and i found it. But my issue is little bit different. Actually, I want to continue this macro from H2 to H(maximum). Please tell us a code in which we can use this code from H2 to H(maximum).
    Option Explicit

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address(0, 0) = "A2" Then
    If Target.Value = "" Then Target.Value = Date
    End If
    End Sub

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Insert current date (static) when cell is clicked?

    Hi bodmas

    Read the forum rules before the moderators get you...

    Forum Rules
    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.

    If you can Edit/Delete your post, do so, if not you'll need to ask a moderator to help you.

    Cheers

  12. #12
    Registered User
    Join Date
    10-28-2009
    Location
    Amritsar,Punjab
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Re: Insert current date (static) when cell is clicked?

    Quote Originally Posted by Marcol View Post
    Hi bodmas

    Read the forum rules before the moderators get you...

    Forum Rules
    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.

    If you can Edit/Delete your post, do so, if not you'll need to ask a moderator to help you.

    Cheers
    @Marcol ~ My concern is almost same as asked in the thread "Insert current date (static) when cell is clicked?". Still! i need to start a new thread and ask the same query.

  13. #13
    Registered User
    Join Date
    05-21-2014
    Posts
    6

    Re: Insert current date (static) when cell is clicked?

    Hi there,

    Could you tell me how this code can be modified to only work for the cell range C:4:K40?

    Thanks

  14. #14
    Registered User
    Join Date
    10-28-2009
    Location
    Amritsar,Punjab
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Re: Insert current date (static) when cell is clicked?

    Its an old thread, I have forfeit this project.

+ 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