+ Reply to Thread
Results 1 to 4 of 4

Macro to format column cell as Time after pasting values collected from sheets

  1. #1
    Registered User
    Join Date
    06-22-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    Office 10
    Posts
    13

    Macro to format column cell as Time after pasting values collected from sheets

    Dear all,
    I have a file that is a monthly time logbook. Each sheet is a day of the month (except the first sheet that has different information).
    Then, I am using a macro that goes through the sheets on the workbook corresponding to each day of the month, collects the data and pastes it on a new sheet (named "Master", gathering all the information there.
    In the daily sheets, three of the columns are realted to time and have the format h:mm
    "time in" (col D)
    "time out" (col E)
    "Hrs:Min" (col G = E-D).
    I would like that the new columns D, E and G with the pasted data on the "Master" sheet had the same time format. How do I do that?

    Thank you in advance for any help.

    Here is the complete code of the macro:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to format column cell as Time after pasting values collected from sheets

    Insert the following code:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    06-22-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    Office 10
    Posts
    13

    Re: Macro to format column cell as Time after pasting values collected from sheets

    Thanks!! It works! I wonder if I should set this Thread as "solved", and how...

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to format column cell as Time after pasting values collected from sheets

    To mark as SOLVED, select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Macro to only allow pasting of values and not format??
    By Celt in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 01-26-2021, 01:45 PM
  2. [SOLVED] data to be collected from various dated worksheets in master sheets
    By greatairi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2016, 06:33 AM
  3. [SOLVED] Macro to match values and format cell colour in several sheets
    By lindafinlay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2013, 01:53 AM
  4. [SOLVED] Macro to loop through cell values in a column and format multiple cell values
    By Roop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2012, 05:39 PM
  5. Problem with pasting row and changing cell column values based on row
    By mdorfeuille in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2011, 09:08 PM
  6. Item not Collected: Format not supported bt office Clipboard
    By paujoh-8 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-17-2011, 12:09 PM
  7. Generate a 3rd sheet from data collected from 2 other sheets
    By nicoza in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-09-2009, 07:54 AM

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