Hello all!
I'm a VBA beginner and need to master it for document automation. I wrote some 400 lines of code for this particular project and got stuck on this particular problem. I tried using double for loop and If WorksheetFunction.CountIf, but it creates a new column for each value in A, not consolidates unique ones into one column..
The title might be confusing, so let me explain what should happen:
I have a table A10:C10. For every unique value in A1:A10, it should create a new column and use this unique value as the header of the new column, then list all the unique values from matching row in the next column(B1:B10 in this example). Each new column should also have a sum of # count from C1:C10 and prefix this to the header. Please see the snap of example worksheet for clarity:
I'm a VBA beginner and need to master it for document automation. I wrote some 400 lines of code for this particular project and got stuck on this particular problem. I tried using double for loop and If WorksheetFunction.CountIf, but it creates a new column for each value in A, not consolidates unique ones into one column..
The title might be confusing, so let me explain what should happen:
I have a table A10:C10. For every unique value in A1:A10, it should create a new column and use this unique value as the header of the new column, then list all the unique values from matching row in the next column(B1:B10 in this example). Each new column should also have a sum of # count from C1:C10 and prefix this to the header. Please see the snap of example worksheet for clarity: