+ Reply to Thread
Results 1 to 12 of 12

Employee Number

  1. #1
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    115

    Employee Number

    All,

    I have a list of employees that i need to simplify into groups as listed below

    Employee No's
    1-19
    20-50
    50-199
    200-499
    500+

    In my list of data (attached) that i receive i currently manually count the employee numbers and then put them into the relevant bands dependant on the employee sizes. Example:

    Employee List
    4
    28
    35
    46
    503
    376
    2000

    Employee No's
    1-19 - 1
    20-50 - 1
    50-199 - 3
    200-499 - 1
    500+ - 2

    Any ideas?
    Attached Files Attached Files

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Sionos

    I've used SumProduct. Does this look OK for you?

    HTH

    DominicB
    Last edited by dominicb; 08-19-2008 at 04:30 AM.
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Hi Sionos,

    Please see the attached file for a couple of possible solutions - I prefer the sumproduct approach because it would be easy to change/add new "band ranges" into the file whereas IF statements can only be nested 7 times & are possibly harder to maintain.



    hth
    Rob
    Attached Files Attached Files
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  4. #4
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520
    Hi broro183,

    Also you can try this formula on sheet1!B2:

    Please Login or Register  to view this content.
    Corine

  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    AND(A2<=19,A2<=50,A2<=499) evalutes to a2<=19 so what are you trying to achieve?

    Regards

    Dav

  6. #6
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    115
    Thanks guys for your input, I now have a verifiable, fully automatic way to achieve what i need, many thanks.

  7. #7
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Thanks for the feedback Sionos :-)

    Corine, sorry, like Dav I don't understand how your suggestion would work either but at least Sionos' problem is now solved.


    Rob

  8. #8
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520
    Hi broro183, Dav,

    Just try the formula and see if its working or not. I've attached a sample for you to check and sorry if i misunderstood siono's question...

    Attached Files Attached Files
    Last edited by corinereyes; 09-04-2007 at 04:28 AM.

  9. #9
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    ahhhh, I see...

    Corine, no need to apologise, your formula does appear to work for your intent but I think you've misunderstood the question.

    My understanding is that Sionos' first section ("employee No's") represents the groups (or "bands") which he/she needs the data to be summarised into (ie a count of the number of data rows that fall within each band).
    The second section ("Employee List") is an example of the actual data (& I suspect that this would normally be listed alongside some text eg specific company names/departments, which has probably been removed for confidentiality reasons etc).
    The third section is the bands with the expected results listed alongside each band based on the example data. For example, the "500+" band has 2 rows in the example data which have a number greater than 500 (503, 2000, in bold below).
    I'd say they've just had a typing error with the results that don't match the example.


    I have a list of employees that i need to simplify into groups as listed below

    Employee No's
    1-19
    20-50
    50-199
    200-499
    500+

    In my list of data (attached) that i receive i currently manually count the employee numbers and then put them into the relevant bands dependant on the employee sizes. Example:

    Employee List
    4
    28
    35
    46
    503
    376
    2000
    Employee No's
    1-19 - 1
    20-50 - 1
    50-199 - 3
    200-499 - 1
    500+ - 2

    Any ideas?

    Hopefully that clarifies things for you Corine :-)


    Rob

  10. #10
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    115
    Broro, I have one question to add to your already excellent solution. Next quarter i will receive a similar list of numbers to put into bandings and it may be a shorter or longer list, how do i easily change the cell ranges for the calculation?

    Many thanks for your help so far

  11. #11
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Just make the ranges too large and adjust the sumproduct to exclude blanks

    g6: =SUMPRODUCT(($A$5:$A$3260<>"")*1,($A$5:$A$3260<=F6)*1,($A$5:$A$3260>=E6)*1)

    H6: =COUNTIF($B$6:$B$3260,D6) if you still needed it

    then copy them down into the cells to the cells below

    Regards

    Dav

  12. #12
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hi all,

    Sionos thanks for the feedback :-) & sorry about the slow response.

    Dav's solution of providing a range that is "too large" will work but you could also use a "dynamic named range" that automatically resizes based on the number of entries in the particular column.

    Dave Hawley's (?) Ozgrid site has a useful page for explaining dynamic ranges:
    HTML Code: 
    Heaps of other explanations can be found by Googling eg:
    HTML Code: 

    One day I may set up a couple of files & compare the 2 approaches for impacts on calculation speed, memory use etc...
    At the moment though, my preferred approach is the dynamic range because it will always resize (providing calculation is set to automatic), whereas the fixed range which is currently "too large" may at some stage become too small without users even realising that not all info is being considered.


    hth
    Rob

+ 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