Can't run macro created in 2003 to excel 2007

norman+10

New Member
Joined
Feb 23, 2011
Messages
5
Hi Guys,

Anyone who can help me figure out what's wrong with this code.

Sheets("excl").Select
Rows("1:1").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter Field:=71, Criteria1:="<>"
Dim Firstrow3 As Double
Firstrow3 = 2
Do Until Cells(Firstrow3, 1) = ""
Firstrow3 = Firstrow3 + 1
Loop
ActiveSheet.Cells(Firstrow3, 1) = ""
Range(Cells(Firstrow3 - 1, 1), Cells(1, 47)).Select
Selection.Copy
Sheets("Branford").Select
Cells.Select
ActiveSheet.Paste
Range("A1").Select

I have created this in excel 2003 but can't seem to get it running on excel 2007. Here's the purpose of the code. I have a tab named "excl" and then formulated columns were added to identify if a line belongs to a specific department given each specific parameters. The macro will filter those items like in this case "Branford". The macro will filter all non-blanks items under that columns and then transfer it to a "Branford' tab. I hope this makes sense.


Thanks in advance.



Norman
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,564
Messages
6,179,544
Members
452,925
Latest member
duyvmex

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