+ Reply to Thread
Results 1 to 12 of 12

Add Weekly Hours To Get 4 Weekly Total Hours

  1. #1
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18

    Exclamation Add Weekly Hours To Get 4 Weekly Total Hours

    Hi.

    I've been working on a personal timesheet to keep track of my hours at work. I've made great progress, but I am stuck on my final formula, I have tried everything to get a result, but it's not happening.

    To calculate the weekly hours from the attached worksheet I have used this formula:

    Please Login or Register  to view this content.
    I wish to get a result that shows all four weeks calculated so that each week the hours worked and hours up/down are displayed with text. As an example, I want it to say this on cell A2: Total Hours Worked: 88:03 - £851 Total Pay. Where the 88.03 hours are this would be dynamic by the actual hours each week and the same with the total pay by adding all the weeks up. Doing a simple SUM formula doesn't give the expected result. I have done SUM in cell I1 and I2 and tried this formula, but it doesn't work:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I hope someone can advise. Any help would be appreciated.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    You say using SUM doesnt give the expected result, but I'm not 100% sure what the expected results are or why a SUM wouldn't work.
    If it's a case that it needs to be dynamic because you could have varying numbers of shifts each week, and therefore varying numbers of rows of data, then you could use SUMIF.

    If you put the word "Totals" as a header in the rows that sum the weeks up (in your example file that's A11, A20, A30 and A40) then you could use the below formula in cells A2.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If that doesn't do what you need then give us a bit more of an explanation of the expected outcome and we can help from there.

    BSB

  3. #3
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    Hi.

    Thanks for your response.

    What I've done so far is used the SUM function in cell I1 which is: =SUM(F11,F20,F30,F40). This calculates my total hours in each week. I've then used the SUM function in cell I2 which is =SUM(G11,G20,G30,G40). This calculates my total pay in each week. Then in cell A2 the cell I1 and I2 is referenced to output the total hours and pay. This formula is:="Total Hours Worked: "&TEXT(I1,"[hh]:mm")&" - "&TEXT(I2,"£#,###")&" Total Pay".

    I'm getting a positive result, but the total pay in cell A2 has rounded up to £851 which should be £850.56. How do I get it to display the true value and not the rounded up number?

    I guess I over complicated my question. If there's a better way to get my results instead of using SUM and then referencing the cell again that'll be great. Mainly I need to ensure the total hours worked and total pay is calculated in A2.

    I hope that helps better.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    Understand you now.
    Adding the part in red below will prevent the pay being rounded up:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You can do away with the need for I1 and I2 by moving those sum formulas into the main formula, like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  5. #5
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18
    Thank you that worked wonders.

    I wanted to change the text should, but I can't remember the formula even though it's in front of me. The formula is now:

    ="Total Hours Worked: "&TEXT(SUM(F11,F20,F30,F40),"[hh]:mm")&" • "&TEXT(SUM(G11,G20,G30,G40),"£#,###.00")&" Total Pay"

    How do I get it to say this: Total Hours Worked: 88:03 • Total Pay: £850.56

    Thanks again for your help. That second formula was a treat to not have another formula to reference to.

  6. #6
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    I figured it out. Thank you for all your help. I truly appreciate it.

    I used this code:

    Please Login or Register  to view this content.
    Last edited by SoulfulNeo; 06-06-2022 at 10:00 AM.

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    No problem at all. Glad I could help

    BSB

  8. #8
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18
    Quote Originally Posted by BadlySpelledBuoy View Post
    No problem at all. Glad I could help

    BSB
    I feel bad for asking, but I've run into one final issue and then I'm done. With the help you gave earlier I've added in text to display of my hours are up or down hard on contract hours and hours worked. I've got this formula to add all the hours, but it's returning 00:00 no matter what I do. So you happen to know what's causing this and a fix?

    Thanks.

    ="Total Hours Worked: "&TEXT(SUM(F11,F20,F30,F40),"[hh]:mm")&" • Total Pay: "&TEXT(SUM(G11,G20,G30,G40),"£#,###.00") &" • Contract Up / Down: "&TEXT(SUM(H11,H20,H30,H40),"[hh]:mm")

  9. #9
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    The 00:00 result is caused by the up/down values being being in text format.
    Excel isn't great at showing negative times, well not without changing the default date system to the 1904 date system.

    There may be another way around it but I'll have to have a think on it.

    BSB

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    Maybe this?

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  11. #11
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    Thank you so much. This worked perfectly. Simple little .00 fixes everything. Thanks for all your help.

  12. #12
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Add Weekly Hours To Get 4 Weekly Total Hours

    Happy to help mate. Good luck with the rest of the build and give us a shout if you need more help along the way.

    BSB

+ 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. Calculating Weekly Total Hours from Daily Times
    By RFernandez in forum Excel General
    Replies: 7
    Last Post: 04-12-2016, 07:13 PM
  2. Replies: 5
    Last Post: 01-11-2016, 11:15 PM
  3. [SOLVED] Total number of hours by person from a weekly schedule
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2015, 05:18 PM
  4. Creating a Bi-Weekly Work Schedule with Total Hours.
    By DauntlessDS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-31-2015, 07:53 PM
  5. Need help with weekly timesheet to round all hours to nearest 1/4 hours
    By markjoel777 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-16-2013, 12:19 AM
  6. [SOLVED] Does anyone have a weekly schedule that computes total hours work
    By Guillermo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-03-2006, 01:10 AM
  7. Replies: 1
    Last Post: 09-14-2005, 12:05 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