Hi,
I have a list of data as follows:
1 X
2 X
3 Y
4 Z
5 X
6 X
7 Y
8 Y
9 Z
10 Y ... and so on...
In this data, with the help of Excel functions or vba macros, I would like to extract the result as follows:
1, 2, 5, 6 (This is the list of X category separated by commas)
3, 7, 8, 10 (This is the list of Y category separated by commas)
4, 9 (This is the list of Z category separated by commas)
I created a macro in VB editor for this, but it gives me the result, only if I manually sort the data and enter the range. But I want to automate this process, that in a particular cell when I select one out of these three, i.e. X, Y, or Z, I will automatically get result as stated above. Or these 3 categories can be fixed for 3 cells, fixed to receive the output. Another is the range as has to be dynamic when automating process. As the range can vary from any amount, may 5 may be 5000.
Can anyone please help me with that.
Thanks in advance.
Rohit
Bookmarks