+ Reply to Thread
Results 1 to 4 of 4

Need to sum different types of absences

Hybrid View

marlonJD Need to sum different types... 08-20-2011, 04:26 AM
jeffreybrown Re: Need to sum different... 08-20-2011, 10:18 AM
marlonJD Re: Need to sum different... 08-22-2011, 06:44 AM
arthurbr Re: Need to sum different... 08-22-2011, 07:15 AM
  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need to sum different types of absences

    I have a list of absences and a calculation to work out how many working days were lost during a given period.

    The absences are to be categorised as either 'Short' or 'Long'. A short absence is <= 20 and a long absence is => 21.

    The aim is to have something like this

    Absence Reason | Days Lost Short | Days Lost Long | Total Days Lost

    The current solution is to categorise the absences into Short and Long using an IF statement. We then split the spreadsheet into two separate worksheets named Short and Long.

    A separate spreadsheet is then set up with the list of absence types. We then use the SUMIF function

    =SUMIF(Short!K:K,A2,Short!I:I)
    This works but it seems very clumsy. Is there a more elegant solution to this?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Need to sum different types of absences

    I wouldn't categorize the Sumif as clumsy, if it returns the results you desire it is probably the right choice for you. That is, unless it seems to be taking an extrodinary time to calculate. If this is the case other methods could be explored, but for now the Sumif seems appropriate.

    A cleaner method though might be a pivot table.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-09-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need to sum different types of absences

    Quote Originally Posted by jeffreybrown View Post
    I wouldn't categorize the Sumif as clumsy, if it returns the results you desire it is probably the right choice for you. That is, unless it seems to be taking an extrodinary time to calculate. If this is the case other methods could be explored, but for now the Sumif seems appropriate.

    A cleaner method though might be a pivot table.
    By clumsy I meant that we had to go through various stages to reach a point where we could use SUMIF.

    I'm not familiar enough with the syntax to know whether it would be possible to create a SUMIF statement that could look at the table and SUM absences that were of a certain type and met a defined criteria for number of days. E.g. if the absence type is Anxiety and the number of days lost is equal to or less than 20 then sum those absences and return the number.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Need to sum different types of absences

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

+ 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