ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Count is not in a certain range, delete Rows (https://www.excelbanter.com/excel-discussion-misc-queries/257067-if-count-not-certain-range-delete-rows.html)

CarolynRatcliffe

If Count is not in a certain range, delete Rows
 
I have a spreadsheet that is 59752 x 2, with the one column Contact ID A and
the other column Contact Link ID. It is like an instant messaging system. It
looks something like this:

1 2
1 3
1 15
2 1
2 15

I want to count by different values in column A, and any count that is not
within one of several ranges, those rows get deleted. So if the range is 3-5
contacts, then I want to keep the set of 1s, but delete the set of 2s. My
ranges are 4-5 contacts, 30-41 contacts, and 100+ contacts.

I am also brand new to macros, but I have experience with some other coding
in Matlab and other programs and I understand logic statements and the like.
Still, the more help/explanation the better. I am using 2007.

Thank you!!


All times are GMT +1. The time now is 08:09 PM.

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