Hi,
I have a spreadsheet that constantly has data being added to it, i need a macro to sort this data by column C, then for every unique value in column C, insert a row above the first unique value and copy that unique value into column C of that newly inserted row, and do this all the way down the list till it reaches the end.
example:
A..........B...........C
Black....TV........Texas
Red......TV........New York
Blue.....Radio.....New York
Black....TV........Texas
Blue.....Radio.....New York
Red......TV........Texas
So i'd want to first sort it by C, so all New Yorks are listed together, followed by Texas. Then insert a row above the first New York and copy "New York" from the row below, into column C of the new row (in a sense inserting a header row for that group of states). Then repeat the same for Texas and so on till it reaches the end of the list.
A..........B...........C
......................New York
Red......TV........New York
Blue.....Radio.....New York
Blue.....Radio.....New York
......................Texas
Black....TV........Texas
Black....TV........Texas
Red......TV........Texas
Any help is much appreciated. Thank you
I have a spreadsheet that constantly has data being added to it, i need a macro to sort this data by column C, then for every unique value in column C, insert a row above the first unique value and copy that unique value into column C of that newly inserted row, and do this all the way down the list till it reaches the end.
example:
A..........B...........C
Black....TV........Texas
Red......TV........New York
Blue.....Radio.....New York
Black....TV........Texas
Blue.....Radio.....New York
Red......TV........Texas
So i'd want to first sort it by C, so all New Yorks are listed together, followed by Texas. Then insert a row above the first New York and copy "New York" from the row below, into column C of the new row (in a sense inserting a header row for that group of states). Then repeat the same for Texas and so on till it reaches the end of the list.
A..........B...........C
......................New York
Red......TV........New York
Blue.....Radio.....New York
Blue.....Radio.....New York
......................Texas
Black....TV........Texas
Black....TV........Texas
Red......TV........Texas
Any help is much appreciated. Thank you