Excel Project Help Sub or Function no defined.

Motorscooter

New Member
Joined
Nov 20, 2014
Messages
9
I feel horrible for constantly posting questions in here. I am trying to write a macro that will copy cells from specific cells in a bunch of worksheets and pastes them into a new worksheet.
I am trying to debug it and I cant get past the "Sub or Function not Defined" Error. I tried starting from fresh and creating the macro in the Developer tool but I still get the error. Please help.
Code:
Sub copymacro()


Dim ws As Worksheet
Dim count As Integer
Worksheets.Add
Sheet(1).Name = "Copy Table"
count = 1
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Cells(3, 3).Copy Sheets("Copy Table").Cells(1, count).End(xlUp)(2)
ws.Range("C11:C32").Copy


Next




End Sub

Thank you.
 
Last edited by a moderator:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Rich (BB code):
Sheet(1).Name = "Copy Table"
should be:
Rich (BB code):
Sheets(1).Name = "Copy Table"
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,198
Members
448,554
Latest member
Gleisner2

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