Error message in code

FROGGER24

Well-known Member
Joined
May 22, 2004
Messages
704
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
When I run this piece of code I get a error message. "Runtime error 1004 unable to get the specialcellsproperty of the range class"


'runtime error 1004 "unable to get the specialcells property of the Range class
Range("I2:AF" & Cells(Rows.Count, "G").End(xlUp).Row).SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[1]C"
Range("I2:AF" & Cells(Rows.Count, "G").End(xlUp).Row).Copy
Range("I2:AF" & Cells(Rows.Count, "G").End(xlUp).Row).PasteSpecial xlPasteValuesAndNumberFormats
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Not sure of the problem, I don't get it here, but you have a logic error

Code:
    Set Rng = Range("I2:AF" & Cells(Rows.Count, "G").End(xlUp).Row).SpecialCells(xlCellTypeBlanks)
    Rng.FormulaR1C1 = "=R[1]C"
    Rng.Copy
    Rng.PasteSpecial xlPasteValuesAndNumberFormats
 
Upvote 0

Forum statistics

Threads
1,203,236
Messages
6,054,303
Members
444,715
Latest member
GlitchHawk

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