Excel Macro to Copy data from multiple worksheets to master sheet..please help.

anandt23

New Member
Joined
May 11, 2016
Messages
11
Hi
I need help in writing a macro to copy information from multiple worksheets into one master worksheet, within the same workbook.

I have multiple worksheets which are my sales invoices, and a master sheet where I would like to copy all the line items from my invoices, including the invoice number and invoice date.

In each of my invoices I would like to copy the data within the section B18:N28, but only the rows that have data, not the blank rows.
I would also like to copy the section B32:N41, also only the rows with data not the blank rows.

And paste this data into the master sheet.

But I would also like to copy the invoice date which is located in cell M10 and the Invoice Number which is in cell N11 to be pasted against each of these lines.

And I would like to repeat this for all worksheets within the workbook.

Could anyone help me with writing a macro for this please?

<colgroup><col><col><col><col><col><col><col><col><col><col><col span="2"><col></colgroup><tbody>
</tbody>
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Do you have a sample workbook I can work with?
Hi
I need help in writing a macro to copy information from multiple worksheets into one master worksheet, within the same workbook.

I have multiple worksheets which are my sales invoices, and a master sheet where I would like to copy all the line items from my invoices, including the invoice number and invoice date.

In each of my invoices I would like to copy the data within the section B18:N28, but only the rows that have data, not the blank rows.
I would also like to copy the section B32:N41, also only the rows with data not the blank rows.

And paste this data into the master sheet.

But I would also like to copy the invoice date which is located in cell M10 and the Invoice Number which is in cell N11 to be pasted against each of these lines.

And I would like to repeat this for all worksheets within the workbook.

Could anyone help me with writing a macro for this please?

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,594
Messages
6,120,436
Members
448,964
Latest member
Danni317

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