ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? (https://www.excelbanter.com/excel-programming/385123-range-b2-autofill-destination-%3Drange-gx1-activecell-fails-but-why.html)

[email protected]

Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why?
 
Hey,

Sheets("export").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=skus!R2C1"
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell)

I am trying to use the code above to take the value of B2 and autofill
it based on the value in cell GX1. GX1 contains cords like "B2:B6500".
Any help is greatly appreciated!


Susan

Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why?
 
sometimes on autofill you have to select TWO cells to pull down (don't
know why).....
try
range("b2:b3").autofill blah blah

also, you're mixing RC references (R1C1) with letter/number references
(B2) - you have to choose one or the other, i believe.
hth
susan


On Mar 13, 12:55 am, wrote:
Hey,

Sheets("export").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=skus!R2C1"
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell)

I am trying to use the code above to take the value of B2 and autofill
it based on the value in cell GX1. GX1 contains cords like "B2:B6500".
Any help is greatly appreciated!




Vergel Adriano

Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fai
 
If I understood it correctly, this is what you're looking for:

With Sheets("export")
.Range("B2").FormulaR1C1 = "=skus!R2C1"
.Range(.Range("GX1").Text).FillDown
End With



" wrote:

Hey,

Sheets("export").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=skus!R2C1"
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell)

I am trying to use the code above to take the value of B2 and autofill
it based on the value in cell GX1. GX1 contains cords like "B2:B6500".
Any help is greatly appreciated!




All times are GMT +1. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com