why won't this work

  • Thread starter Thread starter Zab
  • Start date Start date
Z

Zab

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.
 
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.
 
i will be able to use what you have given me
THANKS!!!
zab


JLGWhiz said:
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 said:
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.


.
 
Back
Top