Creating Summary Tab based on information in other tabs

SkyeS

New Member
Joined
May 21, 2015
Messages
40
So I am looking to make a macro to do the following:
  • Find the number of tabs with "Test" in the first cell (A1)
  • For each tab:
    • Copy sheet name and paste into Sheet named "Main"
    • Copy row 6 from sheet and paste into Sheet named "Main"
    • Continue until all sheets with the "test" in the first cell are completed

Any Help is welcome!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
How about
Code:
Sub Copytest()

   Dim Ws As Worksheet
   
   For Each Ws In Worksheets
      If InStr(1, Ws.Range("A1").Value, "test", vbTextCompare) > 0 Then
         With Sheets("Main").Range("A" & Rows.Count).End(xlUp).Offset(1)
            .Value = Ws.Name
            Ws.Rows(6).Copy .Offset(1)
         End With
      End If
   Next Ws
End Sub
 
Upvote 0
This worked perfectly!! Thank you so much for your help! I was really struggling to figure out an efficient way to do this.

Once again thank you ! :biggrin:
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,776
Messages
6,132,659
Members
449,744
Latest member
kauamarcosms

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