Microsoft Visual Basic Run-time error '1004' No cells were found

gdramireddy

New Member
Joined
Mar 22, 2011
Messages
1
Hi ,
i am trying to copy the cells and past into other cells, In that some cells are hide and i dont want to copy that cells. i am using bellow code for that.
but i am getting error No cells were found.

Windows(WorkBookName2).Activate
Sheets("MR-CFR&DOT").Select
Range("A9:A27").SpecialCells(xlCellTypeVisible).Copy
Windows(WorkBookName1).Activate 'this is another work book
Sheets("KPI").Select
Range("A47:A51").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

My record details are like that

i have A9 : A27 but i want copy only A9,A23,A25,A26,A27

Pls help me

Thanks,
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Welcome to Mr Excel.

Are you sure that there are some visible cells in that range? Excel thinks not, and I'm sure it's not lying..
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

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