View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default why won't this work

This line:

ActiveCell.FormulaR1C1 = "=RC[-1]/total"

Should be:

ActiveCell.FormulaR1C1 = "=RC[-1]/" & total

But unless you already have data in column D, you probably will not get the
results you expect.



"Zab" wrote in message
...
Sub Macro1()

total = [d65000].End(xlUp).Value
ActiveCell.FormulaR1C1 = "=RC[-2]*RC[-1]"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=RC[-1]/total"

End Sub

there are numerical values in columns A B & C, i run this macro when i am
in
D.
--
Thank You in advance, Zab