ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Analysis? Who's at bat next? I have no idea what to call this. (https://www.excelbanter.com/excel-discussion-misc-queries/205309-analysis-whos-bat-next-i-have-no-idea-what-call.html)

gobonniego

Analysis? Who's at bat next? I have no idea what to call this.
 
I'm trying to make an overtime file for my Fire Department. In it, I will be
keeping track of how many hours of overtime each member has worked. When
it's time to call people and offer them an overtime shift, I need to know who
has the least amount of hours so I can offer it to that firefighter first. I
have a page set up with everyone's name and total OT hours, and I know I can
just sort it to find out who has the least/most. But is there a way for
Excel to do this automatically and possibly pop up the answer of who the
first 5 names off the list of who to call might be?

I certainly have the ability to look up the answer in my Excel book, I just
don't know what to call this type of operation. Can you help me?

T. Valko

Analysis? Who's at bat next? I have no idea what to call this.
 
One way...

A2:A15 = names
B2:B15 = hours

Enter this formula in, say, E2 and copy down as needed:

=INDEX(A$2:A$15,MATCH(SMALL(B$2:B$15,ROWS(E$2:E2)) ,B$2:B$15,0))

Note that if there are ties in total hours then we'll need to modifiy this
formula to account for ties.

--
Biff
Microsoft Excel MVP


"GoBonnieGo" wrote in message
...
I'm trying to make an overtime file for my Fire Department. In it, I will
be
keeping track of how many hours of overtime each member has worked. When
it's time to call people and offer them an overtime shift, I need to know
who
has the least amount of hours so I can offer it to that firefighter first.
I
have a page set up with everyone's name and total OT hours, and I know I
can
just sort it to find out who has the least/most. But is there a way for
Excel to do this automatically and possibly pop up the answer of who the
first 5 names off the list of who to call might be?

I certainly have the ability to look up the answer in my Excel book, I
just
don't know what to call this type of operation. Can you help me?





All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com