View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Selection.Autofill Destination:=Range(ActiveCell.Value)

You said it twice, so it must be what you meant:
In B23 I have the value "B3:B12", I need for the autofill
macro to see the value in B23 and autofill starting at B3 and going to
B12 or whatever the value in B23 is in.


I am basically asking the macro
to read the value from B23 and autofill to the range specified in B23
(B3:B12).



Range(Range("B23")).Value = Range("B23")Value

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
Tom,

Maybe I am not being clear about what it is I need the macro to
do... I have a cell (B23) with the parameters I need the autofill to
fill to. In B23 I have the value "B3:B12", I need for the autofill
macro to see the value in B23 and autofill starting at B3 and going to
B12 or whatever the value in B23 is in. I am basically asking the macro
to read the value from B23 and autofill to the range specified in B23
(B3:B12). I appreciate your help with this issue. I did create a macro
to get rid of the extra code being inserted by having it fill to B1500
but the Excel Workbook is now like 43MB because of the new macro setup.
I got the results I was looking for through your original post but the
workbook size is very large and I know if the code is tweaked alittle
bit it would cut down majorly on the size of the workbook. Once again
thank you!

-Todd



Tom Ogilvy wrote:
My understanding from your description is that you have a formula in B23

and
you want that filled to the activecell.

Apparently that isn't what your situation is.

If you formula is in B3 and you want to fill to the activecell in column

B
then you would do

Range("B3").Autofill Destination:=Range("B3",ActiveCell)

the range on the left is the anchor range and contains the formula. The
destination range must start with the anchor range and the last cell to

be
filled.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Tom it actually turns out that the macro script you gave me is doing
the autofill correctly but its not taking in my target range from CELL
B23. I tried to make sense of the VB Code...what part am I missing?

PART OF CODE My Understanding (?)
------------------- -------------------------
Range("B23"). Goto this Cell

AutoFill Destination: Fill to contents of cell
(TARGET ACQUIRED)

=Range("B23", STOP FILL

ActiveCell) Cell B3?

I'm sorry that was the only way I could get clarification to the code
you displayed. I know the code isn't pulling in my target range

because
if I delete cell B23 on the spreadsheet it still will fill in the
information... I plan on having the same macro fill in more

information
in other columns but seeing as how items might be added / removed this
will eventually cause a problem because its only filing up to 23
rows...once again thank you for your wisdom, I been trying to figure
this out my self the last few days and as always its a really small
code to do such a big thing. =)