ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting based upon category and adding header (https://www.excelbanter.com/excel-discussion-misc-queries/446005-sorting-based-upon-category-adding-header.html)

Vasanth

Sorting based upon category and adding header
 
Hi


I have many rows with 5 coulmns of data.In the 5th column i have a category populated.I want the data to be populated as below


Input data:

Column1 Column2 Column3 Column4 Column5

BASA BASB BAS BAS C
ASA ASA ASA ASA B
DDD DAA DAA DFG C
HSB HSG HSD HFH A
KLM KLN KGH KGS A
RTR RTS RTY RTE C


Desired result


Column1 Column2 Column3 Column4 Column5

Header for categoryA
HSB HSG HSD HFH A
KLM KLN KGH KGS A

Header for categoryB
ASA ASA ASA ASA B

Header for CategoryC
BASA BASB BAS BAS C
DDD DAA DAA DFG C
RTR RTS RTY RTE C


I need the header to be merged for each category to be merged for 4 columns.Also if there are no data for any category I need "NONE" to be populated after the header.


I have only 3 categories.But since the rows are too many I need a macro to automate this process.

Please help me in this


Thanks
Vasanth


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com