+ Reply to Thread
Results 1 to 16 of 16

Can you please assist me with adding two new fields from timesheet into my Macro

  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Can you please assist me with adding two new fields from timesheet into my Macro

    Hello,
    Can you please assist me with adding two additional two fields into my macro.
    The macro is to currently converting a timesheet into a csv import file.
    The new columns which need to be included in the macro are Column A Row 7 (Costing), and Column B Row 3 (Rateset).
    An example of the timesheet import file is on the second tax (Example Of Import File).
    Many thanks for your assistance with this.
    I look forward to hearing from you soon.
    Kindest Regards,
    Bec

  2. #2
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    You mean something like this?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Yes that is perfect. Thank you so much for your fantastic assistance.

  4. #4
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Opps one more thing. I have just added a formula the emp timesheet tab for Saturday,Sunday and Public holiday as it was not working the hours out correctly. I then ran the macro and it ended up with a line for every component on every day
    It is possible to change this so it only displays on the import sheet any date with a component on it with a value.
    I have attached the spreadsheet again.
    Thanks a mil for all your help.
    I look forward to hearing from you soon.
    Bec

  5. #5
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    See if this is what you are looking for....
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hello and many thanks for your reply.
    I opened the file up and ran the macro, then i went into the import template for the employee to view the file to be imported and noticed it had all the components listed next to the day with or without a value.
    Is it possible for the template only to pick up any days with a value against it's component.
    I look forward to hearing from you soon.
    Many thanks again for your fantastic assistance
    Last edited by Bec Connolly; 03-10-2015 at 10:55 PM. Reason: Attached File to show after Macro has been run

  7. #7
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hey Bec -
    made another change....hope it helps.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hello Again,

    Many thanks for your fantastic assistance. The file is perfect.

    Your a super star for helping me.

    Have a great day, and thankyou so much again for your remarkable customer service.

    Kindest Regards,
    Bec

  9. #9
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hello Again,

    I promise this is the last time i will ask for assistance on the import file.
    I just ran the macro and did some testing in our system.

    In doing testing i came across a few little things i need some help with.

    1. I updated the employee timesheet with cost accounts for the whole month and i noticed they only came through up until the 24/02/2015.

    2. The formula for Saturday / Sunday and the Public holiday did not come in properly, are you able to assist with the formula for those columns M, N and O. I copied the formula from another column however as you will see on eg: 07/02/2015 and 8/02/2015, the hours ended up in the Normal time column and not the correct weekend columns (Saturday and Sunday

    3. One last thing i entered a employee name with over 25 characters and it came up with a run time error of 1004. Are we able to reset the field size in the macro?

    Are you able to help me one last time.

    Thankyou so very much, you assistance is greatly appreciated.

    Kindest Regards,
    Bec
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Bec....
    1 - date range working
    2 - changed formulas, they 'seem' to be working
    3 - tabs only allow 31 characters. You have the person's name plus 13 extra characters for the date.
    (i.e. Margaret Smith1234 works, but Margaret Smith12345 will not)
    * attached BEC3.xlsm file
    Attached Files Attached Files

  11. #11
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hi Bec,

    I saw this thread and thought your name sounded familiar. I'm the one who originally helped you with this spreadsheet. I found the original thread and I see where you came back with another request a few days after your last post. I apologize for not answering that request, but I usually unsubscribe from a thread a few days after I think it's solved, which means I don't get notified of any further posts on that thread.
    In the future if you post a request a few days after the last post and don't get a response you can always PM the person who was helping you in case they unsubscribed from the thread.
    Anyway having said that I see you've been helped with your current issue. Regarding the issue with the tab name as x61540 has pointed out there's a 31 character limit on the name. I rewrote my original code to take this into account. What it does is if the name will be over 31 characters it makes the employee's first name an initial only, in the sheet name. See the example in the attached sheet. I changed her name to Smithsonian and if you run it you will see it changes the sheet name. Change her name back to Smith and run it again and you will see the difference.

    If it's still too long you will get a message box informing you that it's still going to be too long. There's other things I could do, for instance if you think the person's last name will be the real issue we could cut that down to just an initial or in the case of a situation where the name is too long no matter what we do we could use the employee number, or cut off the date etc.
    There are several possibilities.
    Good Luck!!!
    Attached Files Attached Files
    Last edited by skywriter; 03-17-2015 at 04:12 PM.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  12. #12
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Smile Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hey Again,
    Are you able to help me add a few more things into the Import File and Remove the ratesets from the import file.
    What i need for the system to accept the file is:
    Column A (Emp Code) Add Emp Id to all lines
    Column B (Periods) Add 1 to all lines
    Column C (TrxType) Add N to all lines
    Column E (Rateset) Please remove the Ratesets from all lines.
    Attached is the file i ran and have highlighted the fields in yellow on the import file which need changing.
    Thanks a mil for all your help.
    Kindest Regards,
    Bec
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    See if this works...
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    That is perfect. The import worked 100% with no errors. Well done and thankyou so much for your help.
    Have a great day

  15. #15
    Registered User
    Join Date
    02-23-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    Hello Again,
    I hope you had a nice Easter.
    Are you able to help me again write a formula into my spreadsheet.
    I needed to add to the spreadsheet on the employee time sheet a break start and break finish time. I then put a formula into column H under meal breaks to subtract the meal finish time (column F) from the meal start time (column E). The formula worked for most cells except for a few which i have highlighted in green. (Are you able to come have a look and see what excel is doing as i am completely stumped.
    Also can you please help me to write in a formula for the award into the Columns K (MA7), Column L (N) and Column M (MMID7)> The formula which needs to be added to the already existing formula is to take the meal break out of the component after the employee has completed 3.5 hours into their shift. An example of this is on the employee timesheet for the work completed on 02/02/2015, the employee start time is 18.00 and the finish time is 24.00, the break is 30 minutes, so the total hours should be 6.00 hours. What the award is doing on the timesheet is taking the break from the first component N 0.30 and putting the additional hours 5 onto MA7. (What the award should do is taking the break from the MA7 as that would be 3.5 hours into the shift. The end result would be 1 @ Normal and 4.5 @MA7.
    Are you able to help me ?????
    Kindest Regards,
    Bec

  16. #16
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you please assist me with adding two new fields from timesheet into my Macro

    The problem in you break start and finish formulas is your number formatting. The number format you are using is not a time format. It's just a format that allows you to type 1130 instead of a time format where you have to type 11:30 which is how you would enter a time. So if you look in cell F7 you think you are entering 20:30 and in E7 you think you are entering 20:00, but you really entered 2030 and 2000 and when you subtract the two you come up with 30. You have the same formatting in H7 so you think you've received a result of 30 minutes(0:30), but this is not a time. Now look in cells F19 and E19 where you expect to the result of 30 minutes and your result is 0:70, it's because you are doing the math on these numbers 1200-1130, which is in fact 70 because you didn't enter times you entered numbers into a cell that has formatting that inserts a colon into the number. I notice in your K column you have some formulas where you are constantly using the Text function and I'm not an expert on dates and times but I wonder if it wouldn't be better to just format everything as times and enter it as times and do date time math instead of all that text stuff.
    Last edited by skywriter; 04-08-2015 at 01:31 AM.

+ 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] Adding new Timesheet from a list
    By OAM in forum Excel General
    Replies: 1
    Last Post: 03-24-2014, 02:23 PM
  2. [SOLVED] Macro to assist on a VLOOKUP
    By Thomas92 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-07-2014, 04:05 PM
  3. [SOLVED] Macro to assist with formatting.
    By TJ Saulnier in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2013, 09:30 AM
  4. Timesheet issue adding hours
    By karmaimages in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2012, 05:08 AM
  5. Adding 16 vba buttons/macro to filter data fields?
    By pagination1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2012, 04:29 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