why won't this work

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.
 
J

JLGWhiz

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.
 
Z

Zab

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.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top