copy filtered rows only error

zabiullakhan

Active Member
Joined
Aug 30, 2010
Messages
310
I get error message as below

Code:
Run-time error '1004':
 
Microsoft office excel cannot create or use the data range refrence because it is too complex. Try one or more of the following:
[LIST]
[*]Use data that can be selected in one contiguous rectange.
[*]Use data from the same sheet.
[/LIST]

for the blow code

Code:
Cells(2, Col).Select
Range(Selection, Selection.Offset(LastInfoRow, 0)).Select
[COLOR=red]Selection.SpecialCells(xlCellTypeVisible).Copy[/COLOR]

In the above code LastInfoRow is a function which gives me the last row of my data

I get error on line marked with red and the data i have is of 45000 rows and filtered data is of just 31000 rows.

Please help.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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