macro to copy range
How did you want the formula in C4 copied to C7 before it is filled down...
exactly as written or adjusted for the 3 row offset? The following macro
assumes you wanted it copied exactly as written...
Sub CopyC4ToC7ThenFillDown()
Dim LastCell As Long
LastCell = InputBox("Fill dow to which cell?")
If IsNumeric(LastCell) Then
With Worksheets("Sheet3")
If LastCell 7 And LastCell <= .Rows.Count Then
.Range("C7").Formula = .Range("C4").Formula
.Range("C7:C" & LastCell).FillDown
Exit Sub
End If
End With
End If
MsgBox "You didn't enter a valid row number"
End Sub
Rick
"Frank Situmorang" wrote in message
...
Hello,
We appreciate if anybody can help me to wrote a macro to copy a formula to
a
ong range:
This is my worksheet layout more or less:
A B c
1
2
3
4
5.
.
.
.
.
I want to copy a formula in cell C4 tp range C7 upto C65000
maybe it is simple, but since my background is accountancy so I really do
not know how to make it.
Since the range will be dynamic, but it is difficult to make it, if
possible
it prompts us to fill in from C7 to C.......( dots means it prompts us to
fill in celll of column C.
Thanks in advance for any idea.
--
H. Frank Situmorang
|