excel - Loop through list to copy batches of like values -


i'm trying copy batches of rows, based upon 1 column's values.

the worksheet looks (sorted first column):

  5  blue    6  yellow   b  3  red   b  2  blue   

the loop has 3 primary steps:

  1. copy rows beginning value, e.g. rows 1-2, both begin "a"
  2. paste rows email (i know how this)
  3. move value, b, , copy rows starting b

i won't know values of column a, change each time. there way can still write loop?

2 possible approaches:

1: rather thinking of copying "a" rows @ once, have build string add each row, , when hit new value first column, flush build string email. way single loop condition check in there.

2:

  • maintain startpos. set 1.
  • loop through first col till value changes.
  • copy startrow - currentrow - 1 email.
  • set startpos = currentrow.
  • repeat.

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -