#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Employees & Managers

Hi

I have Excel 2003.
I have list of employees and manager in sheet #1.
For example I have list of 20 employees in column A and list of managers in
column B.
I have only 5 managers, mean that I will see their names more than once in
column B.

In sheet #2 I have the same 5 managers, but this time as headers (columns
A-E).
How the names of the employees from sheet #1 can copy themselves under the
manager that they belong to in sheet #2?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Employees & Managers

Try this:

Using defined named ranges as follows:

Emp: refers to Sheet1A$2:A$21
Man: refers to Sheet1B$2:B$21

With your 5 manager names on Sheet2 in A1:E1, enter this array formula** in
Sheet2 A2:

=IF(ROWS(A$2:A2)<=COUNTIF(Man,A$1),INDEX(Emp,SMALL (IF(Man=A$1,ROW(Emp)),ROWS(A$2:A2))-MIN(ROW(Emp))+1),"")

Copy across to E2. Then select A2:E2 and copy down to row 21.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"NirOrtal" wrote in message
...
Hi

I have Excel 2003.
I have list of employees and manager in sheet #1.
For example I have list of 20 employees in column A and list of managers
in
column B.
I have only 5 managers, mean that I will see their names more than once in
column B.

In sheet #2 I have the same 5 managers, but this time as headers (columns
A-E).
How the names of the employees from sheet #1 can copy themselves under the
manager that they belong to in sheet #2?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Employees & Managers

THANX!!!!!!!

"T. Valko" wrote:

Try this:

Using defined named ranges as follows:

Emp: refers to Sheet1A$2:A$21
Man: refers to Sheet1B$2:B$21

With your 5 manager names on Sheet2 in A1:E1, enter this array formula** in
Sheet2 A2:

=IF(ROWS(A$2:A2)<=COUNTIF(Man,A$1),INDEX(Emp,SMALL (IF(Man=A$1,ROW(Emp)),ROWS(A$2:A2))-MIN(ROW(Emp))+1),"")

Copy across to E2. Then select A2:E2 and copy down to row 21.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"NirOrtal" wrote in message
...
Hi

I have Excel 2003.
I have list of employees and manager in sheet #1.
For example I have list of 20 employees in column A and list of managers
in
column B.
I have only 5 managers, mean that I will see their names more than once in
column B.

In sheet #2 I have the same 5 managers, but this time as headers (columns
A-E).
How the names of the employees from sheet #1 can copy themselves under the
manager that they belong to in sheet #2?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Employees & Managers

You're welcome!

--
Biff
Microsoft Excel MVP


"NirOrtal" wrote in message
...
THANX!!!!!!!

"T. Valko" wrote:

Try this:

Using defined named ranges as follows:

Emp: refers to Sheet1A$2:A$21
Man: refers to Sheet1B$2:B$21

With your 5 manager names on Sheet2 in A1:E1, enter this array formula**
in
Sheet2 A2:

=IF(ROWS(A$2:A2)<=COUNTIF(Man,A$1),INDEX(Emp,SMALL (IF(Man=A$1,ROW(Emp)),ROWS(A$2:A2))-MIN(ROW(Emp))+1),"")

Copy across to E2. Then select A2:E2 and copy down to row 21.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"NirOrtal" wrote in message
...
Hi

I have Excel 2003.
I have list of employees and manager in sheet #1.
For example I have list of 20 employees in column A and list of
managers
in
column B.
I have only 5 managers, mean that I will see their names more than once
in
column B.

In sheet #2 I have the same 5 managers, but this time as headers
(columns
A-E).
How the names of the employees from sheet #1 can copy themselves under
the
manager that they belong to in sheet #2?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scheduling Employees Steve K Excel Discussion (Misc queries) 1 July 3rd 08 02:09 PM
Employees Rosco58 Excel Worksheet Functions 0 February 27th 06 08:03 PM
I need an autosum for each box where employees use x's of 1's JMar Excel Worksheet Functions 1 February 7th 06 10:03 PM
How do I set up a weekly schedule for my managers (vacation etc.) Gloria Willie Setting up and Configuration of Excel 1 November 30th 05 03:15 AM
Ranking employees Winni23 New Users to Excel 7 July 29th 05 01:59 AM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"