Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
andyiain
 
Posts: n/a
Default Recording macros with autofill


Hi,

I've oft have occasion to record macros, yet I'm not very good so...

How do you do the equivalent of auto-fill a column by double clicking
the bottom right hand corner of a cell. When I do this in a macro I
record, rather than record the auto-fill of a series of data for the
length of data it puts in the range that should be auto-filled. It
means that if i use the macro again on a sheet with a different amount
of data I'll get missing results of cell errors.

Any help would be appreciated.

Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Recording macros with autofill

I'm afraid that's just the way Excel records that function and you're stuck
unless you want to get into the VB Editor and edit your macro.

Where the recorded macro would have a line like this.....
Selection.AutoFill Destination:=Range("L8:L1055")

You would have to change it to look like this.....
Selection.AutoFill Destination:=Range("L8:L" & _
Cells(Rows.Count, 1).End(xlUp).Row)

If you want to try this, be sure to do so on a copy of your file in case of
things happening that you didn't want to have happen..........

hth
Vaya con Dios,
Chuck, CABGx3




"andyiain" wrote:


Hi,

I've oft have occasion to record macros, yet I'm not very good so...

How do you do the equivalent of auto-fill a column by double clicking
the bottom right hand corner of a cell. When I do this in a macro I
record, rather than record the auto-fill of a series of data for the
length of data it puts in the range that should be auto-filled. It
means that if i use the macro again on a sheet with a different amount
of data I'll get missing results of cell errors.

Any help would be appreciated.

Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698


  #3   Report Post  
Posted to microsoft.public.excel.misc
andyiain
 
Posts: n/a
Default Recording macros with autofill


Hi, thanks for the reply,

I modified the macro as suggested but when i ran it i got a dialogue
error box with just the number 400 in it, when i hit help it didn't do
anything. Anyone know what this means?

Regards
Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698

  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Recording macros with autofill

The code works fine in my model.........please post your macro.

Vaya con Dios,
Chuck, CABGx3



"andyiain" wrote:


Hi, thanks for the reply,

I modified the macro as suggested but when i ran it i got a dialogue
error box with just the number 400 in it, when i hit help it didn't do
anything. Anyone know what this means?

Regards
Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698


  #5   Report Post  
Posted to microsoft.public.excel.misc
andyiain
 
Posts: n/a
Default Recording macros with autofill


Hi Chuck,

Thanks for that.

I'm not too familiar (to say the least) with VBA, seems I mucked things
up when I tried to type this in to the Macro.

It is sorted now.

Many thanks for all your help.

Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698



  #6   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Recording macros with autofill

Glad you got it working.........thanks for the feedback.

Vaya con Dios,
Chuck, CABGx3



"andyiain" wrote:


Hi Chuck,

Thanks for that.

I'm not too familiar (to say the least) with VBA, seems I mucked things
up when I tried to type this in to the Macro.

It is sorted now.

Many thanks for all your help.

Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698


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
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
How do I make the Stop Recording bar pop up when recording macros J Excel Worksheet Functions 1 January 10th 06 08:46 PM
How do I display stop recording toolbar for macros Randy Excel Discussion (Misc queries) 2 July 8th 05 08:56 PM
Macros not recording tCannon Excel Discussion (Misc queries) 3 May 16th 05 08:51 PM
recording macros Pat New Users to Excel 2 January 17th 05 03:33 PM


All times are GMT +1. The time now is 10:55 PM.

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

About Us

"It's about Microsoft Excel"