Loop through sheets and copy cell if it contains a text

zach1011

New Member
Joined
Mar 15, 2017
Messages
1
I am trying to loop through 20-30 sheets within a workbook and copy and paste values into a new sheet if it contains a certain text.

Column B contains the text and I would like to copy the cell in column B and the value in column C. For example, column B has 46 rows and with various names:

Column B Column C
Baseball 5
Football 6
Basketball 2
Baseball 1
Soccer 9
Golf 15
Basketball 17


This is how every sheet is set up and I am trying to copy and paste the values for Baseball and Basketball onto a new sheet at the end of the workbook.

Thanks for the help!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,215,523
Messages
6,125,317
Members
449,218
Latest member
Excel Master

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