Hi I’m trying to use VBA to get the minimum and maximum values of two columns based of an ID.
I have three columns (A, B, C) with headers containing numeric digits.
So far I managed to make the macro to list the unique ID and count how many times this ID is repeated.
I need to get maximum and minimum values of the first two columns based on the third column (ID).
Any ideas would be greatly appreciated!
Input Sheet
Value 1 Value 2 ID
100 500 3
100 700 3
101 800 4
90 1000 1
800 900 8
1000 397 50
70 50 1
120 900 3
80 70 8
342 322 1
356 368 4
370 215 4
384 161 1
398 107 1
411 54 8
425 0 3
439 -54 8
Results sheet:
ID Counts Min Value1 Max Value1 Min Value2 Max Value2
1 5 70 398 50 1000
3 4 100 425 0 900
4 3 101 370 215 800
8 4 80 800 -54 900
50 1 1000 1000 397 397
Bookmarks