The data is in the form:
1 a
1 b
1 c
2 d
3 e
1 f
2 g
3 h
2 i
For grouping all the values against unique entries, a,b,c,f in front of 1, d,g,i, in front of i and so on, i have following VBA code:
Function MYVLOOKUP(lookupval, lookuprange As Range, indexcol As Long)
Dim r As Range
Dim...