Hello,
I have hundreds of rows of data sorted by Col1 similar to this.
[pre]
[/pre]
How do I do this in VBA? Any help would be greatly appreciated. Thanks!
I have hundreds of rows of data sorted by Col1 similar to this.
[pre]
Code:
Col1 Col2 Col3 Col4 Col5
Data1 1 1 1 1
Data1 2 2 2 2
Data1 3 3 3 3
Data2 1 1 1 1
Data2 2 2 2 2
Data3 1 1 1 1
Data4 1 1 1 1
Data4 2 2 2 2
Data4 3 3 3 3
Data4 4 4 4 4
Using VBA, I want to extract/summarize the data into a new spreadsheet with sum, average, min & max calculations each time the value in Col1 changes. My desired output is this:
Col1 Sum(Col2) Min(Col3) Max(Col4) Average(Col5)
Data1 6 1 3 2
Data2 3 1 2 1.5
Data3 1 1 1 1
Data4 10 1 4 2.5
How do I do this in VBA? Any help would be greatly appreciated. Thanks!