reorganise table

I get this accounts table in a format which is highly inconvenient to work with. It has strings of text which are split into rows instead of wrapping in a cell, numbers which are merged across cells.

Can someone give me a macro to convert this table into a more manageable format with split texts collected together and numbers in the appropriate column and no blank rows or columns so that further working on this file is convenient.
AccountStatment.XLS
LVL 43
Saqib Husain, SyedEngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

redmondbCommented:
ssaqibh,

Following does it for this file, at least. Be careful, the only intelligence here is whatever Excel brings!

BTW, this was recorded on 2010.
Option Explicit

Sub Tidy_Bank()
Dim xLast_Row As Long

With Cells
    .VerticalAlignment = xlTop
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    .MergeCells = False
End With
Cells.EntireColumn.AutoFit
Columns("I:I").ColumnWidth = 44.56
Columns("I:I").WrapText = True
Cells.EntireRow.AutoFit
Cells.AutoFilter
xLast_Row = Range("A1").SpecialCells(xlLastCell).Row
ActiveSheet.Range("$B$1:$V" & xLast_Row).AutoFilter Field:=1, Criteria1:="="
ActiveSheet.Range("$B$1:$V" & xLast_Row).AutoFilter Field:=8, Criteria1:="="
ActiveSheet.Range("$B$1:$V" & xLast_Row).AutoFilter Field:=9, Criteria1:="="
Range("B3").Activate
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Delete Shift:=xlUp
Cells.AutoFilter
Range("I8").Select
ActiveWindow.FreezePanes = True
Range("Q:S,N:N,M:M,K:K,G:H,E:E,C:C").Delete Shift:=xlToLeft
Columns("E:E").EntireColumn.AutoFit
Range("F2:F4").Cut Destination:=Range("E2:E4")
Columns("F:F").Delete Shift:=xlToLeft
Range("H5:H6").Cut Destination:=Range("I5:I6")
Columns("H:H").Delete Shift:=xlToLeft
Range("D5:D6").Cut Destination:=Range("C5:C6")
Columns("D:D").Delete Shift:=xlToLeft
Range("G5:H6").Cut Destination:=Range("F5:G6")
Range("A:A").Delete Shift:=xlToLeft

End Sub

Open in new window

Regards,
Brian.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Saqib Husain, SyedEngineerAuthor Commented:
Thanks. Saved me some time.
0
redmondbCommented:
Thanks, ssaqibh. Brought back un-fond memories!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.