+ Reply to Thread
Results 1 to 7 of 7

Enter today's date without changing previous dates

  1. #1
    Registered User
    Join Date
    02-16-2017
    Location
    North America
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    69

    Enter today's date without changing previous dates

    January 9, 2019

    Hello,

    I have two problems I hope some of you experts can help me with. Both have to do with a spreadsheet where upon clicking a button the sheet would do two things.

    First it would go to a certain cell and then enter today's date. I figured out how to go to the correct cell but if I use the NOW function or the TODAY function, then when I run the macro tomorrow the originally correct date from today gets changed to tomorrow's date, which is not what I want.

    Second -- and I realize this is a different problem that I'm happy to switch to a new thread if that's what I should do -- I want the macro (or VBA if that's better) to move the cursor, the focus, two cells to the right.

    Here's what I have so far. The third line, with OFFSET, throws an error.

    Please Login or Register  to view this content.
    How should this look so as to solve these two problems?

    Thanks.
    Last edited by AliGW; 01-09-2019 at 12:32 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Enter today's date without changing previous dates +

    1. Assign TODAY's date to a variable.
    Place the value of that variable in a cell, not a formula like =TODAY()

    Maybe (untested)

    Please Login or Register  to view this content.

    2. Shouldnt this

    Please Login or Register  to view this content.
    be this

    Please Login or Register  to view this content.
    -2 is two cells to the LEFT surely?
    Last edited by Special-K; 01-09-2019 at 11:13 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    02-16-2017
    Location
    North America
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    69

    Re: Enter today's date without changing previous dates +

    Two problems presented, two problems solved, and in an understandable way. Wow, thanks, Special-K.

    If you want to tackle another one, how can I get the cursor to move two cells to the right after entering, say, the time of day I want, but in the case of other cells the cursor should move the usual one cell to the right? It might require VBA, which I don't know how to combine with the macros I've painstakingly written.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Enter today's date without changing previous dates +

    Mmm, not sure about that one, I'm not really an expert on VBA I'm afraid.

  5. #5
    Registered User
    Join Date
    02-16-2017
    Location
    North America
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    69

    Re: Enter today's date without changing previous dates +

    OK, thanks, Special-K, for not trying and failing and thus confusing me and wasting my time. Admitting you don't know is much better, as certain U.S. president's need to learn.

    I will post this latest question as a new thread.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,223

    Re: Enter today's date without changing previous dates

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    02-16-2017
    Location
    North America
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    69

    Re: Enter today's date without changing previous dates

    AliGW, the thread is now marked as Solved.

    I didn't know to do that so thanks for the help. I'm afraid I'm a bit of a boob around here, but I'm learning, I'm learning.

+ 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. Need excel formula previous date to today
    By tariqjahangir in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2018, 11:51 AM
  2. [SOLVED] Prefill text box in userform with today's date but allow user to enter unique date
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2014, 09:17 AM
  3. [SOLVED] Excel VBA - getting previous and last DATE from TODAY
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2014, 12:32 PM
  4. [SOLVED] how to enter today's date into cell
    By johnandrews in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2014, 04:44 AM
  5. Today date and previous data
    By Kevalin O in forum Excel General
    Replies: 2
    Last Post: 08-16-2013, 07:04 AM
  6. [SOLVED] Excel 2007 : Convert Today's Date To The Previous Month & Year
    By The_Snook in forum Excel General
    Replies: 8
    Last Post: 04-26-2012, 06:37 AM
  7. Replies: 2
    Last Post: 02-12-2010, 06:18 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