Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | bob | mm1 | ||||
2 | andy | mm1 | ||||
3 | al | mm1 | ||||
4 | stewart | ag1 | ||||
5 | smith | ag1 | ||||
6 | terry | dc1 | ||||
7 | jason | dc1 | ||||
8 | jay | as1 | ||||
9 | albert | yn1 | ||||
10 | ||||||
Sheet1 |
I have a very simple spreadsheet such as the one above.
Sheet two of the workbook is a simple column that is 456 cells long. Of this column, there are six data sets, every sixth cell, basically. So data set one is: A1, A7, A13, etc. Data set two is: A2, A8, A14, etc. And so on.
What I'd like to do is to have a macro count the blank cells in each of the six data sets, and based on which data set has the most blank cells, copy the names from the other spreadsheet (column A) into that data set, starting from the top. This is based on the contents of column B; when all of the names that are "MM1" have been copied, the macro would than calculate the number of blank cells per data set again...and then copy over the "AG1's."
Mind you, the actual spreadsheet of names is 400+ lines long. Is this possible?