Reformatting/Deduping Data to Long Form

rwille

New Member
Joined
Sep 29, 2022
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I'm having trouble reformatting data like how it is shown to the right in my screen shot.

The row data from a1:c10 I have is in alphabetical order by order id, from oldest transaction to newest for each respective account ID. With different transaction information as columns. I would like to reformat the data into a longer form as shown in f1:n4

Any idea the best way to approach this?

Thanks
Screenshot 2023-02-24 130038.png
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi

You could use filter function to solve this problem.

1677629356871.png


I have the above data and solution (on right side)

Enter the following formula in D2

=SORT(UNIQUE(A2:A8))

The following formula in E2 and copy it down

=TRANSPOSE(SORTBY(FILTER($C$2:$C$8,$A$2:$A$8=D2),FILTER($B$2:$B$8,$A$2:$A$8=D2)))

Kind regards

Saba
 
Upvote 0
here is another take on it:

mr excel questions 12.xlsm
ABCDEFGHI
1IDPaydateTypeID1ST 2ND3RD4TH
2AA11002019-08-28HAA1100HHB 
3AA11002020-08-28HAAC926HH  
4AA11002021-08-28BABR765VHHB
5AAC9262017-08-28H
6AAC9262018-08-28H
7ABR7652016-08-17V
8ABR7652020-08-28H
9ABR7652021-08-28H
10ABR7652022-08-28B
Sheet7
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(A2:A10)
F2:I4F2=IFERROR(INDEX($C$2:$C$10,MATCH($E2&(1/LARGE((IFERROR(1/((--($E2=$A$2:$A$10))*($B$2:$B$10)),0)), COLUMNS($E$2:E$2))),$A$2:$A$10&$B$2:$B$10,0)),"")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top