+ Reply to Thread
Results 1 to 13 of 13

How to use the SUMIFS function so it calculates the right values

  1. #1
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    How to use the SUMIFS function so it calculates the right values

    Hi!

    I have a worksheet where I type in hours for the ppl working in the factory.
    At the end of the moth I have to know (for each person) how many hours has he worked (regular hours) how much overtime he has and how much vacation he used.
    The sheet that I have looks like this sample just has all the months in it this one just has January.

    The "dop." column counts the number of "D" in the row <---- This works fine it just counts how many days the person is missing.
    The "na.u." column is the column that should count overtime for the whole month.
    Overtime counts as any hour that he worked on the weekend (weekends are painted gray), any hour in during the week that is above 8 (so if it says 12 that 4 hours of overtime)
    The "ure" column should count every work day (Monday-Friday) up to 8hrs. (So if it says 12 then thats 8 regular hours and 4hours over time).

    I hope some one understands what I'm tryn to do here
    Is it possible to do this with a functions and formulas?

    If not then I'll write a macro, but it's not realy for me it's for my co-worker but he and computres (two different pair of shoes )
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: How to use the SUMIFS function so it calculates the right values

    can u provide this sheet in english?
    so that i can understand your inside matter and can help u?

    Regards
    CA Mahaveer Somani

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to use the SUMIFS function so it calculates the right values

    hi stojko89, i did a couple of changes in your file that i think could be useful. let me know if you don't like it or unable to use it. then we might have to think of a more complicated formula.
    1) i changed the text in B1 to be a date. i then custom format to show the month spelled out
    2) i changed the numbers in B7:AF7 to be a dates. i then custom format to show the days
    3) i used conditional formatting to highlight the weekends

    this can be used for the rest of the other months by just changing B1
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Yeh benishiryo!

    That works Great.
    The only problem is that the sheet in my workbook looks a bit different.
    Every next month is to the right.

    I tryed somehow copying it to the right or using the past special but it kind of doesn't work
    Do I have to copy the formulas in some other way to other months or how do I copy it?
    Here is the original file. Or how it should look like

  5. #5
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Yeh benishiryo!

    That works Great.
    The only problem is that the sheet in my workbook looks a bit different.
    Every next month is to the right.

    I tryed somehow copying it to the right or using the past special but it kind of doesn't work
    Do I have to copy the formulas in some other way to other months or how do I copy it?
    Here is the original file. Or how it should look like

    Is it also possible to color hollidays as gray?
    I mean so if some one works on a holliday that should also be count as over time.
    But if I gray the hollidays manualy it won't count the hours as over time it will count it as regular hours right?

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Sory about the 2 posts. But some error accured in the Data here in the forum (don't know what that was about) and when I looked this happend

  7. #7
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Ok so here is the original file that will be used.
    All the gray colored days in months are holidays, saturday and sunday or the day doesn't exits.
    I just left every month from 1-31 so the formula stays the same for each month.
    Attached Files Attached Files
    Last edited by stojko89; 01-15-2013 at 05:56 AM.

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to use the SUMIFS function so it calculates the right values

    ahhh, you shouldnt have to manually colour them. let Excel do it for you~ i placed a list of holidays for you in OV7 onwards. this way, it can be re-used again & again
    Attached Files Attached Files

  9. #9
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Ok!
    I'm going to try this out.
    I'll get back to you in 2hrs.

  10. #10
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Nope.
    The normal work hours up to 8hrs works fine.
    The "D" for workers free day works fine.
    The overtime works fine if I type 12hrs on a work day. <---Thats good.
    But if I type 4hrs on a holiday or saturday or sunday (gray areas) then it doesn't count it as overtime or normal work time.
    It should count it as ovetime because this is not taken as normal work time.

    This is from my first post:
    The "na.u." column is the column that should count overtime for the whole month.
    Overtime counts as any hour that he worked on the weekend (weekends are painted gray), any hour in during the week that is above 8 (so if it says 12 that 4 hours of overtime)
    But to make it simpler any hour that is typed in the gray area should be counted in the overtime column of the month (na.u. - column).

    I've added a few holidays to the list and changed the month names so I'm returning this workbook back to you, hoping that you'll help me with this this too.
    If you don't I'm lost
    I was never good with excel forumlas hehe. But you've done an amasing job!

    Under december I've inserted some work hours in normal field and some overtime during the week and some during the weekend (gray area)
    The outcome should be ure: 16 na.u: 8
    17th Dec. get's count under ure (normal work time)
    19th Dec. get's count 8hrs under ure (normal work time) and 4hrs under na.u (overtime)
    21st Dec. get's count under na.u 4hrs - Because it's a Saturday and that is not a normal work day.

    Or maby I did something wrong when I copyed the months?
    Attached Files Attached Files

  11. #11
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to use the SUMIFS function so it calculates the right values

    whoops. i added extra dollars in a range. AH8 should be:
    Please Login or Register  to view this content.
    copy that formula & apply to all the months for "na.u". remember to press CTRL + SHIFT + ENTER to confirm. i hope that's all the mistakes you found!

  12. #12
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Hello again!
    I'll do that and get back to you with an answer hehe

  13. #13
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: How to use the SUMIFS function so it calculates the right values

    Well I guess this is it
    I think it all works now.

    You rocked the s**t out of this workbook
    Many thanks for your help!

    I don't know what else to say

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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