Hi,I have a list of customer names with their attributes, as given below
Name | Title | Age | Surgery | Surgery Date |
Thomas Dereck | Mr. | 32 | SR1 | 5/12/2014 |
Svanki Rogolus | Mr. | 21 | TY3 | 5/21/2015 |
Steve Watson | Mr. | 44 | SR2 | 3/9/2016 |
Emily Smith | Ms. | 19 | TT11 | 1/9/2012 |
I want to transpose this table and create "profiling cards" for each customer (that I will later write to hive table). Is it doable with a macro?
Cust1 | CustName | Thomas Dereck |
CustTitle | Mr. | |
CustAge | 32 | |
SurgeryType | SR1 | |
SurgeryDate | 5/12/2014 | |
Cust2 | CustName | Svanki Rogolus |
CustTitle | Mr. | |
CustAge | 21 | |
SurgeryType | TY3 | |
SurgeryDate | 5/21/2015 | |
Cust3 | CustName | Steve Watson |
CustTitle | Mr. | |
CustAge | 44 | |
SurgeryType | SR2 | |
SurgeryDate | 3/9/2016 | |
Cust4 | CustName | Emily Smith |
CustTitle | Ms. | |
CustAge | 19 | |
SurgeryType | TT11 | |
SurgeryDate | 1/9/2012 |
Solved! Go to Solution.
Thanks it works, but have one more question, instead of repeating cust1 5 different times, can we use it only once per record
Like;
Cust 1
CustName
Title
Age
SurgeryType
SurgeryDate
Cust 2
CustName
Title
Age
SurgeryType
SurgeryDate