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:
- copy rows beginning value, e.g. rows 1-2, both begin "a"
- paste rows email (i know how this)
- 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
Post a Comment