LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
William Whitlam via OfficeKB.com
 
Posts: n/a
Default Need help with excel autofill VBA style

Hi everyone, I need help with autofill. The situation is that I have an
excel spreadsheet that contain 2 worksheets: sheet1 and sheet2. The sheet1
basically contains just raw data; while sheet2 contains a number formula
that are used for calculation.
<Sheet1 <Sheet2
A B A B
1 2 1 1 Sum AVG
2 3 9 2 =SUM(Sheet1!A1:Sheet1!B1) =SUM(Sheet1!A1:Sheet1!B1)
3 7 1 3
4 8 2 4

The question is that I want to write a VBA script that will autofill
the formula in column A2 and B2 downward 3 times according to the number of
rows in sheet1. I need to do it automatically, because sometimes sheet1
will contain 1000 rows while other times it will contain 10000 rows of
data. Anyone got any idea how I can do this?

Many Thanks in Advance.
 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How to autofill excel with an alphabetic sequence (aaa, aab, etc.. dogisnuts Excel Discussion (Misc queries) 3 April 8th 05 07:46 PM
I get a program error when I download an excel template Ladybug Excel Discussion (Misc queries) 3 March 4th 05 12:02 AM
html to excel nellie Excel Discussion (Misc queries) 4 February 8th 05 10:37 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM


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