Avatar of Saqib Husain
Saqib Husain
Flag for Pakistan asked on

VBA: Reformat data exported from software to excel.

I have attached a file exported from an accounting software to excel which inserts the data and merges cells unnecessarily.

Can someone do a macro for me to convert this format to a more excellish layout?
Reformat-software-output.xls
Microsoft Excel

Avatar of undefined
Last Comment
Saqib Husain

8/22/2022 - Mon
Ingeborg Hawighorst (Microsoft MVP / EE MVE)

Hello,

save the file as CSV. Close and re-open. Now you can easily delete empty rows and columns.

cheers, teylyn
Saqib Husain

ASKER
Thanks, teylyn but I need a macro to do this. I get such a file frequently and I want to put a button on my ribbon which will simply straighten it.
Saqib Husain

ASKER
Also, it would be good if the macro can do a sum of numbers which can be compared with the provided totals.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ButlerTechnology

Can you provide a mock up of what the final results should look like?
Saqib Husain

ASKER
It should look just the same - but without the extra columns and merged cells
ButlerTechnology

Do you want the merged cells removed starting at B10?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Saqib Husain

ASKER
Ok I have done a manual format.


***** File edited ********
Desired-format.xls
ASKER CERTIFIED SOLUTION
ButlerTechnology

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Saqib Husain

ASKER
Perfect

Thanks