VBA macro that copies data from different sheets regardless of the sheet name

cutlercall

New Member
Joined
Oct 17, 2022
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
I pull reports of various employees that list the number of meetings and the types of meetings they had during a pay period.
When I pull the report, excel gives every employee their own worksheet. For example:

Sheet1 - John Doe, 3 evaluation meetings, 1 commercial meeting
Sheet2 - Jane Smith, 6 evaluation meetings, 1 commercial meeting
Sheet3 - Josh Johnson, 4 manager meetings, 3 commercial meetings
Sheet4 - etc.

Each sheets provides a lot more data but what I listed above is all the information I need.
I am trying to create a macro that creates a new worksheet, copies their name, number of meetings and types of meetings all into one organized sheet.
I have been able to successfully use the appropriate cells to copy over the data, but it only works for the first sheet. Whenever I try to use the same macro for sheet 2, it gets stuck on the sheet name "Sheet1".
Is there any way to have the macro ignore the sheet name? Or perhaps is there a better way to achieve my end goal here? Thanks.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You do not need to refer to sheet name

You can use sheets(1) then Sheets(2)

Use a loop

If you would provide more details, I may be able to help you more.

Copy what rows from what sheets and paste these rows into what sheet

Like say copy Rows(1) from sheets(1) to sheets(10) and paste these rows into sheet named "Master"
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,031
Members
449,205
Latest member
Eggy66

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