Using Excel 2013 and I'm struggling to write a formula that allows me to transpose the amounts stacked in column E based on the deduction code in column F using various criteria on the first row/unique identifiers of each stacked data set. I'm thinking there are at least two potential options to solving this but I haven't cracked either yet.
Write a formula (or VBA script? I've only dabbled in formulas so far) based on the unique identifiers in columns A-D to alphabetize or sort by color the deduction code by stacked line item to consistently organize the Deduction Code column to then pull the amount from the Amount column and transpose the amounts into the correct deduction code G-K columns on the same row as the unique identifiers. (I played with adding an A to the deduction code column for the main line item row but couldn't get that to work either.)
Formula (or VBA) to automatically sort the data into groups of 4, 5, or 6 rows, based on how many rows make up each stacked line item/set of unique identifiers, and alphabetize the deductions codes. Then apply Index or Offset formulas or use the transpose function to put the data into the correct deduction code G-K columns on the same row as the unique identifiers.
I enjoy learning new ways Excel can make my life easier but am still working on my execution of complex data processing. These are the only two options I've thought of and tried to figure out but ultimately could not solve my issue.
I don't care if it takes several steps to solve my problem of converting vertically stacked data based on deduction codes into the correct columns and the same row as the unique identifiers as shown on rows 2, 8, 12, and 17.
Any help or solutions are welcome so I don't have to manually group and alphabetize the 4, 5 or 6 rows together then transpose the data into the correct columns.
Thank you!!
Link to the file: https://drive.google.com/file/d/1jNpuRWsFqPRTo9J3-g4X1Qss5nFPRdET/view?usp=sharing