PDA

View Full Version : Group by categories VBA



nickylam0308
05-25-2011, 11:41 PM
Hello guys, i am a newbie in Excel VBA. I am stucked in a situation that i dunno how to group the elements according to categories...Its hard to tell so i give out the example below:

"Employee ID" "Manager"
1 A
2 B
3 C
4 B
5 B
6 A

so the employee ID are unique while they can have a same manager.

The question is : how can i get a table of all employees ID under the columns of manager A B C accordingly??
I know i can use the advance filter to get the unique elements of all manager, but i have no idea how to put each employee under managers.
Sorry for the bad presentation.. i hope i make it clear enough.
Is it possible to do that in Excel using VBA???

I would very appreciate if you can help as i have been looking at VBA books for a week, and still finding a way out...

macropod
05-26-2011, 04:27 AM
Hi Nicky,

Why not sort the data by manager? You could then use formulae to output the data to different columns on another worksheet. No vba required!

shrivallabha
05-26-2011, 07:08 AM
You can also use Pivot Table.