Solved

VBA Macro to clean up report

Posted on 2016-10-26
4
67 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

730 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