LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Frantic Excel-er
 
Posts: n/a
Default Excel Autofilling to 65543-need macro correction

Hi All,

I am writing a macro to use the data/subtotal tool that excel has. I am
inserting a column, and doing a "left" formula in the cell I want that to
start with, and then I am autofilling down. The problem is, I need it to
autofill to the end of the selection, not the end of excel, which it is doing
now....here is the portion of code for the formula and autofilling:

ActiveCell.FormulaR1C1 = "=LEFT(RC[-1],3)"
Selection.AutoFill Destination:=Range(ActiveCell, Selection.End(xlDown))

Also, this active cell in column D is at a different location for each wkst
I use the macro on, so I can't say anything like D1, or D2, it has to be from
the active cell location, and then only to the end of data, which also varies
for each worksheet.

Any help would be greatly appreciated!!!!!!


 
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
Macro excel save mrbalaje Excel Discussion (Misc queries) 1 May 12th 05 06:27 PM
Saving Excel using Macro mrbalaje Excel Discussion (Misc queries) 4 April 20th 05 02:32 PM
Problem Editing Macro in Shared Excel File [email protected] Excel Discussion (Misc queries) 1 March 19th 05 06:43 PM
Open Access Database under and Excel window using a Macro BMSpell Excel Worksheet Functions 1 January 8th 05 05:32 PM
excel macro inconsistency JM Excel Discussion (Misc queries) 2 December 9th 04 01:13 AM


All times are GMT +1. The time now is 02:10 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"