VBA: Extract variable number of rows per variable number of phone numbers
We are looking to automate this process using Excel VBA/macros because we process two to ten spreadsheets a week. We want to extract a certain number of rows per a variable set of phone numbers. For example: a spreadsheet with 200,000 rows has 20,000 rows assigned to ten phone numbers. We want to extract the first ten rows per phone number. Our resulting file will have 100 rows ordered by phone number.
Notes: We need to extract a variable number of records per phone number.
The number of columns can vary. The number of rows can vary.
We need the entire row of data.
The phone number column may be in a different place in each spreadsheet.
The number of phone numbers may vary.
Here's a code that works on one file, but cannot be duplicated to another worksheet because the "field", "criteria" and "rows" change per worksheet.
We thought Index/Match might work, but it only returns one item, rather than duplicates.
We don't have a VBA solution, so we do this manually.
Posts were added to mrexcel.com and stackoverflow.com
stackoverflow excel-vba-extract-variable-number-of-rows-per-variable-number-of-phone-numbers
mrexcel vba-extract-variable-number-rows-per-variable-number-phone-numbers
Any help would be appreciated!
Bookmarks