W
William Whitlam via OfficeKB.com
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.
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.