Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? [email protected] Excel Programming 0 March 13th 07 02:22 AM
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? [email protected] Excel Programming 0 March 13th 07 02:16 AM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM
Help with "Autofill" Destination Range Joe MacPherson Excel Programming 0 May 6th 04 06:03 PM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"