donohara1
asked on
Converting single-set data array into multiple-set data array
I have a data array that is 3 columns, starting on line 2 (line 1 area column headers. I dont know the number of rows. I do know that there are no blank rows in this array.
The first column is a group descriptor, and there can be any number of rows for each dscriptor. The second column is a date, and third column is raw data.
I want a VBA procedure that will:
1. determine the number of rows, and then sort the array first by column one, and then by column two. (sort in date order within each group descriptor). Place the number of rows in the first row, third cell.
2. convert the array from a 3xn array into an array in which each group of three columns (identified by the group descriptor) are moved so each group starts on line 2. For example if there are 6 unique group descriptors, then we will have a 18x m array. Columns 1-3 is the first group, columns 4-6 is the second group, an so on.
Please review the attachment spreadsheet.
Thanks,
Don
sample-of-original-arary-and-con.xlsx
The first column is a group descriptor, and there can be any number of rows for each dscriptor. The second column is a date, and third column is raw data.
I want a VBA procedure that will:
1. determine the number of rows, and then sort the array first by column one, and then by column two. (sort in date order within each group descriptor). Place the number of rows in the first row, third cell.
2. convert the array from a 3xn array into an array in which each group of three columns (identified by the group descriptor) are moved so each group starts on line 2. For example if there are 6 unique group descriptors, then we will have a 18x m array. Columns 1-3 is the first group, columns 4-6 is the second group, an so on.
Please review the attachment spreadsheet.
Thanks,
Don
sample-of-original-arary-and-con.xlsx
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER