Recording a macro with relative reference

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a task that I have to do repeatedly and so I want to record a macro for it. Every time I have to do a conversion by multiplying the number with 3. While recording the macro , I have clicked on relative reference button and then I perfom the calculation. But the macro record
ActiveCell.FormulaR1C1 = "=8*3
where as I want that it should not record 8
Any help plz
Thank
Shilps
 
What do you want it to do, pick up the activecell value? If so, try

Activecell.FormulaR1C1 = "=" & ActiveCell.Value & "*3"

If you want the value of the previous column, try

Activecell.FormulaR1C1 = "=RC[-1]*3"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Shilps said:
Hi,
I have a task that I have to do repeatedly and so I want to record a macro
for it. Every time I have to do a conversion by multiplying the number with
3. While recording the macro , I have clicked on relative reference button
and then I perfom the calculation. But the macro records
 

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

Back
Top