Dividing numbers into sheets
Posted on 2013-08-27
The attached excel file containes various number groups. The goal is to divide these groups into various sheets. Using the number in column B the groups would be divided as follows:
The first number is three ( it may be as low as 1 and as high as 50). Thus the script is to take all groups that begin with three and copy and paste them into sheet 2. Then change the name of sheet 2 to the number three.
Next number is four, so all groups containing the number 4 in column B are copied and pasted into the next sheet. (This would be the next sheet following number 3 above.), and the sheet is renamed '4'.
This process continues until all of the rows in the group are accounted for in their own separate sheet.
Keep in mind that other data may be appended to the left or the right of these groups, therefore, the data is not to be manipulated in any other way other than separating them based on the value of column B. Any data around it is to be moved along with the corresponding numbers.
The first two sheets have been manually moved and renumbered in order to explain the process. FYI: The number used can always be expected in column B and the groups should always begin in B3. Also any numbers that do not appear do not get sheets (i.e. 1 and 2 do not have sheets, thus no blank sheets exist)