Solved

VBA Macro to clean up report

Posted on 2016-10-26
4
36 Views
Last Modified: 2016-10-26
I have a huge report in Excel that needs to be put in list format.  The Customer ID and name only appears at the beginning of each section.  Does anyone know how to write a macro or code to copy the ID down through each related line in the section?  Attached is a before and after shot of a slice of the report.

Thanks for your help!
Insert-column-Copy-Down.xlsx
0
Comment
Question by:thutchinson
  • 3
4 Comments
 

Author Comment

by:thutchinson
ID: 41860863
Here's the sample file I forgot to attach.  Sorry:)
0
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 41861125
You can do it with a couple of formulas, see column E to H.
Then filter for not empty on column G, and copy the filtered result to After sheet.
Insert-column-Copy-Down.xlsx
1
 

Author Comment

by:thutchinson
ID: 41861271
That's awesome! Thank you so very much Ejgil!
0
 

Author Closing Comment

by:thutchinson
ID: 41861452
I am very pleased.  Thank you so much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now