title: Create an array/list/collection of IDs in a column, cross-referenced to the rows each ID appears in
body: <p>I have some data that I am trying to index so that I can have Excel go through it and apply various methods or look up various properties based on each "group" of IDs.</p>
  
  <p>In column A I have the ID for a 'provider'. Each provider will appear anywhere between 1 and 4 times, depending on how many sub-units it has (1,2,3, or M, appearing in column B). The providers will always be consecutive (as in, if a provider appears 4 times, each one will be right after the next).</p>
  
  <p>Thus, the first column will look like this, (transposed to save space): 30111,30111,30111,30111,30113,30113,30114,30114,30114,31308... etc.</p>
  
  <p>I want to iterate through this column and "group" together these IDs so that I can then add to my macro to do actions to each group of identical provider id's. In other words I need to have some sort of index (in an array, list, collection, dictionary, or whatever) that says, the first ID includes rows 1-4, the second ID includes rows 5-6, etc.</p>
  
  <p>Any ideas? I have been trying to use arrays, dictionaries, and collections so far with no success. I feel I am probably having the most trouble conceptualizing the correct solution to this problem.</p>
  
  <p>I think a database might be a more useful solution but having something work in excel is a priority for me, as it makes the solution portable, easier to set up, understandable for more people, and potentially more reliable.</p>