I am using Excel 2010. My son has a spreadsheet that has several hundreds of rows of titles of artist, songs, song length, rating, and so forth. I want to limit the number of rows to display for each artist, based on their rating. Let’s say, either 5 rows per artist, 10 rows per artist, or show all. The options (5, 7, all) to list would be in a CELL value at the top of my listing.
I think I can use an array, with Index and CountA, but I don’t know how to set it up. Any recommendations on how to start this?
[TABLE="width: 517"]
<tbody>[TR]
[TD="align: center"]3
[/TD]
[TD]<= Maximum rows to show
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Artist
[/TD]
[TD]Song Title
[/TD]
[TD]Album
[/TD]
[TD]Rating [/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 2[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 5[/TD]
[TD]Album B[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 2[/TD]
[TD]Album C[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 3[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 1[/TD]
[TD]Album C[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 4[/TD]
[TD]Album A[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 5[/TD]
[TD]Album C[/TD]
[TD]3 Stars[/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 2[/TD]
[TD]Album B[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 3[/TD]
[TD]Album A[/TD]
[TD]3 Stars[/TD]
[/TR]
[TR]
[TD]etc[/TD]
[TD]etc [/TD]
[TD]etc [/TD]
[TD]etc [/TD]
[/TR]
</tbody>[/TABLE]
I’ve tried searching on the internet and tested code and have failed for hours. I have come to a complete stop and I just can’t find the solution to this problem.
Any help would be appreciated.
I think I can use an array, with Index and CountA, but I don’t know how to set it up. Any recommendations on how to start this?
[TABLE="width: 517"]
<tbody>[TR]
[TD="align: center"]3
[/TD]
[TD]<= Maximum rows to show
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Artist
[/TD]
[TD]Song Title
[/TD]
[TD]Album
[/TD]
[TD]Rating [/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 2[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 1 [/TD]
[TD]Song 5[/TD]
[TD]Album B[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 2[/TD]
[TD]Album C[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 2[/TD]
[TD]Song 3[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 1[/TD]
[TD]Album C[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 4[/TD]
[TD]Album A[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 3[/TD]
[TD]Song 5[/TD]
[TD]Album C[/TD]
[TD]3 Stars[/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 1[/TD]
[TD]Album A[/TD]
[TD]5 Stars[/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 2[/TD]
[TD]Album B[/TD]
[TD]4 Stars [/TD]
[/TR]
[TR]
[TD]Artist 4[/TD]
[TD]Song 3[/TD]
[TD]Album A[/TD]
[TD]3 Stars[/TD]
[/TR]
[TR]
[TD]etc[/TD]
[TD]etc [/TD]
[TD]etc [/TD]
[TD]etc [/TD]
[/TR]
</tbody>[/TABLE]
I’ve tried searching on the internet and tested code and have failed for hours. I have come to a complete stop and I just can’t find the solution to this problem.

Any help would be appreciated.