Making a Macro to Generate a Report

joeyjj

Board Regular
Joined
Aug 12, 2010
Messages
62
Hello all,

Currently I have a program that consists of several buttons to that the user clicks to input different types of information such as ductwork dimensions and such. What I would like to do after all the information has been input into the worksheet. I would like to make a macro that would copy parts of the information and paste those into a new sheet called Report. Basically I want to summarize the data into a report format, however, I do not need all the data from the worksheet I am copying from. For example if my worksheet looks like this:

Name, Width, Height, Length, Thickness
Duct, 12, 12, 12, 1
Duct, 12, 12, 12, 1



Bad Data, 1, 1, 1, 1


Where each comma represents a new cell. I would like to copy only the information that is Duct, 12, 12, 12, 1 and not the information about and not the Bad Data Below.


Any Advice?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Welcome to the Board!

Have you tried Auto Filter or a Pivot Table?

I am currently using VBA and coding to make the report. Would Auto Filter or Pivot Tables be a better option?

The information I have in the worksheet is Noise Attenuation Levels of Ductwork. There are also several blank spaces which I would not like to copy into the report sheet.
 
Upvote 0
I am currently using VBA and coding to make the report. Would Auto Filter or Pivot Tables be a better option?

The information I have in the worksheet is Noise Attenuation Levels of Ductwork. There are also several blank spaces which I would not like to copy into the report sheet.

It all depends on what works for you. Both can remove blank rows if they're set up properly. As much as I like VBA, if you can do something natively, then it's often best to go that route. Although nothing says you can't combine the two...
 
Upvote 0
It all depends on what works for you. Both can remove blank rows if they're set up properly. As much as I like VBA, if you can do something natively, then it's often best to go that route. Although nothing says you can't combine the two...

Thanks for the advice I will try that out today. :)
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,901
Members
452,948
Latest member
Dupuhini

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