Create a Macros that seemingly deletes rows at random

Closed
Report
Posts
1
Registration date
Tuesday February 17, 2015
Status
Member
Last seen
February 17, 2015
-
I have a spreadsheet that is sorted by Facility, then Financial Class, and then Patient Type.

I need to only have 0-2 rows of data for each Patient type that is not IP. For patient types equal to IP, I need to have 6 rows of data.

However if the Facility type is TR or KR, it needs to exclude these from the above criteria.

How do I create something that removes excess rows of data, while leaving the required amount of rows for each Patient type?

Thanks