Looking for a VBA Code to copy/paste in a workbook onto a blank sheet

Stevesmail

New Member
Joined
May 3, 2021
Messages
11
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello everyone

I have a workbook that has several sheets. Each sheet is named 123, & (A,-Z). See the screenshot I provided. This is a workbook that is being used in my place of employment to search Material Safety Data Sheets.

What I'm looking for is VBA to copy and paste column C in all worksheets in a workbook and paste onto a clean worksheet in the same workbook. I want the Material Names in Column C on each sheet to be be onto one page where it can be printed. I'm having trouble finding a macro that'll copy the pertinent values in column c on every sheet and bringing the info onto one page. I can easily put a macro to get this information from one sheet, but not several. The values I want copy and pasted all start on cell C7 on each sheet. The values I want copied can end on C20 or can end on C150. It all depends on what sheet is being pulled from. So the end cell isn't consistent from sheet to sheet, but is consistent at the starting cell which is C7. Any ideas I can work with? Thanks
 

Attachments

  • Screenshot 2023-07-21 134229.jpg
    Screenshot 2023-07-21 134229.jpg
    168.4 KB · Views: 9

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hello everyone

I have a workbook that has several sheets. Each sheet is named 123, & (A,-Z). See the screenshot I provided. This is a workbook that is being used in my place of employment to search Material Safety Data Sheets.

What I'm looking for is VBA to copy and paste column C in all worksheets in a workbook and paste onto a clean worksheet in the same workbook. I want the Material Names in Column C on each sheet to be be onto one page where it can be printed. I'm having trouble finding a macro that'll copy the pertinent values in column c on every sheet and bringing the info onto one page. I can easily put a macro to get this information from one sheet, but not several. The values I want copy and pasted all start on cell C7 on each sheet. The values I want copied can end on C20 or can end on C150. It all depends on what sheet is being pulled from. So the end cell isn't consistent from sheet to sheet, but is consistent at the starting cell which is C7. Any ideas I can work with? Thanks
Hi Steve,
Assuming you add a new sheet at the beginning, and then run this macro, you would just need to loop through the sheets and perform the same step of the macro you described above.
Something like this;

VBA Code:
Sub YourSub()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
'insert your desired steps here, where you get the data and then paste to the new sheet
Next ws
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,937
Messages
6,175,513
Members
452,650
Latest member
Tinfish

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