Hi All,
I would like some help with some code to amend a reports format based on unique values
The original report comes in the below format
I need a macro to convert to the below format
I believe the steps are as follows
I would like some help with some code to amend a reports format based on unique values
The original report comes in the below format
Transaction | YEAR_MONTH | Product |
ET-Unknown ET | 2024 05 | XXX |
ET-Unknown ET | 2024 05 | XXX |
New Business-New Business | 2024 09 | XXX |
New Business-New Business | 2024 09 | XXX |
New Business-New Business | 2024 09 | XXX |
Refund | 2024 09 | XXX |
Refund | 2024 09 | XXX |
Refund | 2024 09 | XXX |
Refund | 2024 09 | XXX |
Cancel | 2024 09 | XXX |
Cancel | 2024 09 | XXX |
Cancel | 2024 09 | XXX |
Cancel | 2024 09 | XXX |
Cancel | 2024 09 | XXX |
I need a macro to convert to the below format
ET-Unknown ET | |
YEAR_MONTH | Product |
2024 05 | XXX |
2024 05 | XXX |
New Business | |
YEAR_MONTH | Product |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
Refund | |
YEAR_MONTH | Product |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
Cancel | |
YEAR_MONTH | Product |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
2024 09 | XXX |
I believe the steps are as follows
- Find unique value in Column A
- Insert 2 rows above
- Copy unique value in column A into first new row (Header 1)
- Move headers from column B & C to Column A & B (Header 2)
- Move delete data in column A for the transaction that has been found and move data from columns B & C over one column to column A
- Repeat process for next unique value in column A