use information from an input box in cell reference formula

  • Thread starter Thread starter Chas
  • Start date Start date
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
 
Maybe

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

Mike
 
Works OK for me -- what's happening when you use it? (I assume there's a
worksheet named PURCHASING).
 
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
 
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
 
Back
Top