Need to Show Only a Certain (Variable) Number of Rows in xls

sunday_storyteller

Board Regular
Joined
Jun 22, 2007
Messages
51
I am making a report that lists a certain number of entries per manager, based on performance. The number of entries changes from week to week for each manager, and it is not very predictable. I need to know how to make Excel list 2 rows for a manager this week, then 10 the next week, etc.

For example:
Manager A had 5 service calls last week. Manager B had 1 service call last week.
Manager A has 2 service calls this week. Manager B has 3 service calls this week.

For last week's report, I want it to list
MANAGER A
Service call #1 details
Service call #2 details
Service call #3 details
Service call #4 details
Service call #5 details

MANAGER B
Service call #1 details

Then on this week's report, I want it to list it like this:
MANAGER A
Service call #1 details
Service call #2 details

MANAGER B
Service call #1 details
Service call #2 details
Service call #3 details

The data that I am pulling is coming from a different source, so I'm going to have a data sheet that I can paste all the service calls into, then that raw data will feed the primary worksheet (formatted like I detailed above). What I am having trouble with is making it only show 2 lines for manager A and 3 lines for manager B, for example. I know I could make 10 lines (or some other higher number that would be more rows than they would ever get service calls), then have the data fill in from the data sheet. But that will looks sloppy if I have "blank" rows hanging out after the managers that have fewest service calls.

Thanks for any help you can give on this!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi
Without knowing how your data is spread and how you wish to collate data it is difficult to tell you what to do.
=countif(A1:A25,"Manager A") will tell you how many times manager A appears in col A. you can use this data to fix the no of rows.
Ravi
 
Upvote 0
How to Set the Number of Rows

Thanks! Once I have the count, how do I tell Excel to only use "X" Rows then move on to the next manager. Is there a formula for that?
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,084
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top