-
Solved: End(xlUp).Row).FillDown formula
A big hey from TX,
Is there a way to use a FillDown formula, similar to the one below, if the current cell is not known? Here is my scenario: [vba]Range("A8").Select
Cells.Find(What:="PRODUCT", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 10).Activate
ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-4]"
Range("K8:K" & Cells(Rows.Count, "J").End(xlUp).Row).FillDown
ActiveSheet.UsedRange[/vba] The FillDown formula listed above is one that I use consistantly when I know the activecell address. Is there a way to replace "K8:K" using ActiveCell or something else that would allow me to fill down the formula to the last cell in Column J? Or is there another non cell specific FillDown formula? The distance between ActiveCell and the end of Column J always varies.
I would really appreciate anyone's help on this.
R1C1
Last edited by R1C1; 04-10-2006 at 08:24 PM.
-
[vba]
ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-4]"
Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column - 1).End(xlUp)).FillDown
[/vba]
-
Thank you xld. Works great, but I knew that you knew that, but you did not know that I knew that you knew that, thanks for knowing. Now the newbie knows.
Master
Mark this one solved!
R1C1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules