Grouping data

Hi all

Above is the sample data given. In this i want to group all the class codes and amount of each location
eg: for loc 1, there are 3 class codes and 3 amount it has to loop one after the other
for loc 2, there are 2 class codes and 2 amounts it has to loop one after the other
like wise for all the location it has to loop. (The data table is already ready)

Guys help me in solving this . Any advice and suggestions are welcome …thanks in advance!!


Why don’t you try Pivot Table?

@HareeshMR its not an excel sheet …its a data table

Yes @vinutha1,

You can simply write it to a excel file and make it a pivot. I thought it would be easy instead of doing it in the code.

@HareeshMR… the data table is generated by itself…we cant do it from excel. we have to pull the data from generated data table only