Hi all. Thanks for your help in this forum.
I've attached two images that will help visualize what I'm trying to do. I have 4 different types of data that need to be sorted. In the 'as is data' image, you can see that the accounts (Col A) is all clumped together. The 'output' image shows what I would like to happen. The number of data elements will change for each spreadsheet (macro) I would run the code on. The 'output' image shows highlights that are just for illustration and coding is not needed for that.
The first section in 'output' is for the accounts that are only numbers. The second sections is for accounts that have letters after the first 3 digits.
A Sum is produced for a combined total of the values in the Amt Column.
Next, when the first three digits are 'Fnd'. Total is produced for this section. The numbers to the right of the Amt column is removed.
Lastly, if the Name Column is named 'Enc' the row would be placed in this section. An alternate way to code this is to evaluate whether the 5th and 6th digit is 0 if it is, the row transfers into the last section and a sum for this section is produced. The numbers to the right of the Amt column is removed.
Note, each section is sorted by the Account without any sorting into any other section.
Note: There are deliberately hidden cells which will remain in the spreadsheet.
I've attached two images that will help visualize what I'm trying to do. I have 4 different types of data that need to be sorted. In the 'as is data' image, you can see that the accounts (Col A) is all clumped together. The 'output' image shows what I would like to happen. The number of data elements will change for each spreadsheet (macro) I would run the code on. The 'output' image shows highlights that are just for illustration and coding is not needed for that.
The first section in 'output' is for the accounts that are only numbers. The second sections is for accounts that have letters after the first 3 digits.
A Sum is produced for a combined total of the values in the Amt Column.
Next, when the first three digits are 'Fnd'. Total is produced for this section. The numbers to the right of the Amt column is removed.
Lastly, if the Name Column is named 'Enc' the row would be placed in this section. An alternate way to code this is to evaluate whether the 5th and 6th digit is 0 if it is, the row transfers into the last section and a sum for this section is produced. The numbers to the right of the Amt column is removed.
Note, each section is sorted by the Account without any sorting into any other section.
Note: There are deliberately hidden cells which will remain in the spreadsheet.