+ Reply to Thread
Results 1 to 6 of 6

name date time stamp function

  1. #1
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    name date time stamp function

    Hi

    I will need a couple advice on a VBA code that I have been working on. The code basically scans in/out the time stamp that is entered on cell A2 on the "scan" tab. It finds the date and lodges in the entry on the monthly tabs

    1. Instead of just the date/time stamp, I need it to also include the name of the user stamp as well
    2. Can the code be amended to not just find the date in one tab but to increase the range to other tabs as well.For example i have 2 tabs named March and April. Once
    Please Login or Register  to view this content.
    function in cell B2 moves to the next month the vba should also look into the april tab etc
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: name date time stamp function

    Hi, if you wish to register the user you can use the environment variable USERNAME or you can use the Application.User.
    If you place the TODAY function in cell it will update every time you open the file so it's never the same.
    To timestamp I would advice the NOW in VBA, not directly in formula for the same reason but in that way you also have the date AND time so you really know which is the last entry of a particular date
    Hope this helps a little to give you an idea, I'm not that good at explaining
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    Re: name date time stamp function

    Hi Can i know which part of the VBA i should replace with the username variable here.
    Last edited by michael35; 03-19-2019 at 07:13 AM.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: name date time stamp function

    You place that in the cell with where the result goes, just add those parameters
    Instead of just placing today you add the string and then the date or v.v.
    It's a question of lay-out.
    If you would please mark the one or two lines where you want that to show up then I'll show you.
    I'm not going to analyse your code and ASSUME, I like to work with facts.

  5. #5
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    Re: name date time stamp function

    Hi Keebellah,

    Sry I meant in which part of the code should i add it into. In the attached file on post 1, the function currently shows the date time stamp on the monthly tabs when i scan into the scantab on cell A2. The date that is referenced is to on the scan tab on cell B2 which is the today function. The only addition I need on the VBA is to include a username with the date time stamp when it runs.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: name date time stamp function

    You add it tho that part of the code, how difficult can that be?

    Something like this (just typed so if you get a syntax error dig into it

    Please Login or Register  to view this content.

+ 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. [SOLVED] Convert Unix Date-time stamp to excel date and/or time columns
    By judikz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2015, 05:46 PM
  2. Need vba code to change date&time stamp as date format dd-mmm-yy in A:A rng
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2014, 06:08 AM
  3. Adding time (more than 24 hours) to date time stamp
    By sidapt in forum Excel General
    Replies: 6
    Last Post: 01-06-2014, 04:08 AM
  4. [SOLVED] Splitting a time stamp into one column for time and another for date
    By Ellsworth Smith in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2013, 02:41 AM
  5. Need to capture date data in a text string containing a date and time stamp
    By Grilleman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2013, 01:14 PM
  6. [SOLVED] Extract a time from a cell with date and time stamp and then perform calculations
    By Marcos Aristotelous in forum Excel General
    Replies: 3
    Last Post: 10-31-2012, 04:36 AM
  7. Using Date-Time stamp in a IF function
    By ComcoDG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-15-2008, 12:49 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