0

Well, I recorded a macro but it is not working correctly. It is as followed:

Sub OpenCase1()
'
' OpenCase1 Macro
'

'
    Range("G5").Select
    ActiveCell.FormulaR1C1 = "=R[-4]C[-3]"
    Range("G5").Select
End Sub

It's a simple command, I thought, but obviously it is not working. What I want it to do is, when clicking the macro, it will change cell G5 to =D1, copying the contents of cell D1. From previous help I have gotten, the Select parts in the macro may be a problem, however it might not be the case in this.

All help is rather appreciated, please help :)

1 Answer 1

3

Simplify the code by accessing the cell directly without Select

Range("G5").Value = "=D1"

or

Range("G5").Formula = "=D1"

or if you want to use your notation for some other reason

Range("G5").FormulaR1C1 = "=R[-4]C[-3]"
1
  • Heh Heh, or I could have done that. Thank you Amer. :)
    – Mordecaii
    Apr 23, 2013 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.