PDA

View Full Version : Solved: End(xlUp).Row).FillDown formula



R1C1
04-10-2006, 07:09 PM
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: 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 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

Bob Phillips
04-11-2006, 02:52 AM
ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-4]"
Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column - 1).End(xlUp)).FillDown

R1C1
04-11-2006, 10:17 AM
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.

:bow: Master

Mark this one solved!

R1C1