MACRO to COPY DATA from Master Worksheet to new sheets

[Closed]
Report
Posts
2
Registration date
Tuesday September 1, 2015
Status
Member
Last seen
September 3, 2015
-
Posts
2
Registration date
Tuesday September 1, 2015
Status
Member
Last seen
September 3, 2015
-
Hello,
I hope everybody here are doing fine!

Please, if anyone could help me with a macro for one of my Master reports.

I don't really know much about creating macros. All I've done so far is use "record macro" and copy syntax/commands from my readings.

I have a master worksheet that contains several "SRF" (see Column A) and data in each SRF (rows). Columns are from A to AJ. Rows go down to more than 100000.

I want to copy all the data for each SRF to a new sheet within the same workbook.


This is where I am so far, I've copied this to one of the:

Sub Macro1()

Dim myRange As Range
Dim myCell As Range
Set myRange = Range("A2:A10000")
For Each myCell In myRange
If myCell Like "*SRF 250.0*" Or _
myCell Like "*SRF 320.0*" Or _
myCell Like "*SRF 330.0*" Or _
myCell Like "*SRF 410.0*" Or _
myCell Like "*SRF 601.0*" Or _
myCell Like "*SRF 610.0*" Or _
myCell Like "*SRF 610.1*" Or _
myCell Like "*SRF 610.2*" Or _
myCell Like "*SRF 700.0*" Or _
myCell Like "*SRF 710.0*" Then


At this point I should be creating a new sheet and copying the data into each sheet and name each sheet as SRF 250.0, SRF 320.0 .... Here's a snapshot of my worksheet:
.


End If
Next myCell
End Sub


Your help will be greatly appreciated.

Thanks
ruthf8

1 reply

Posts
2
Registration date
Tuesday September 1, 2015
Status
Member
Last seen
September 3, 2015

I did more research in this forum and I found the solution from the link below. With a few changes...the macro worked perfectly .

Thanks
Ruth


https://ccm.net/faq/21396-excel-a-macro-to-create-new-workbook-and-copy-data#q=macro+copy+from+one+workbook+to+another&cur=3&url=%2F

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!