This is the line of code that gives me trouble:
Selection.AutoFill Destination:=Range("G9:G500"), Type:=xlFillDefault
I am trying to fill the range G9:G500, however, G500 is a length determined by the value of cell A1 (Eg: right now Cell A1 is 500) How would i tell the Macro to fill from G9 to "Value of A1" ?
Selection.AutoFill Destination:=Range("G9:G" & Range("A1").value), Type:=xlFillDefault
Method 'Range' of Object ' _global' Failed
My understanding is that A1 has the end row number in it. Like row 500 in your example. Or do you have G500 there? This was setup to have only the end row number.
Also make sure you selected G9 first. If you do have G500 in A1 use this
Range("G9").AutoFill Destination:=Range("G9:" & Range("A1").value), Type:=xlFillDefault
aha, that worked, error was in the data storage type, thanks a bunch for the help! saved me much frustration
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1