Loop through each filter value and add matching row values to an array
Posted on 2013-05-16
I have a spreadsheet that has 2 columns (with headers). The columns are Branch and DisplayName. Right now there are about 700 total rows in my spreadsheet. What I'm trying to accomplish here is to create Outlook e-mails populated with display names in to the TO field based on each distinct Branch value. There are about 15 different branch values when you look at the filter dropdown in excel. In this case, the VBA would generate 15 different e-mails with the display names of each person in their respective branch populated in the TO field.
I have the VBA code to create and populate e-mails created. I just have no clue how to loop through each distinct value of the filter and retrieve the respective matching rows for each distinct value.
Thanks for your help!