use information from an input box in cell reference formula

C

Chas

I have an input box that promps for a row number which I then want to use in
a cell reference on a different tab. For some reason my concatenation isn't
working.

ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & row & "]C[18]"

where row = the input box information

Any help is greatly appreciated.

thanks
 
M

Mike H

Maybe

response = InputBox("enter row")
ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & response & "]C[18]"

Mike
 
B

Bob Umlas

Works OK for me -- what's happening when you use it? (I assume there's a
worksheet named PURCHASING).
 
C

Chas

Still doesn't work, I've been getting a run time error every time I try.

Thanks

Mike H said:
Maybe

response = InputBox("enter row")
ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & response & "]C[18]"

Mike

Chas said:
I have an input box that promps for a row number which I then want to use in
a cell reference on a different tab. For some reason my concatenation isn't
working.

ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & row & "]C[18]"

where row = the input box information

Any help is greatly appreciated.

thanks
 
M

Mike H

is your relative cell off the worksheet?

Chas said:
Still doesn't work, I've been getting a run time error every time I try.

Thanks

Mike H said:
Maybe

response = InputBox("enter row")
ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & response & "]C[18]"

Mike

Chas said:
I have an input box that promps for a row number which I then want to use in
a cell reference on a different tab. For some reason my concatenation isn't
working.

ActiveCell.FormulaR1C1 = "=PURCHASING!R[" & row & "]C[18]"

where row = the input box information

Any help is greatly appreciated.

thanks
 

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