stephen antoine
Board Regular
- Joined
- Jun 4, 2008
- Messages
- 128
Hello all, I'm racking my brain trying to find out how to use a cell value in a formula with VBA.
For example, I have the following code:
FinalRow = Cells(65536, 1).End(xlUp).Row
CYGP = Cells(Final Row, 11).Column
Cells(FinalRow + 2, CYGP).Select
I now need to be able to use the value that's located in the selected cell elsewhere in the spreadsheet. I've tried the following:
ActiveCell.FormulaR1C1 = "=R[FinalRow]C[CYGP]
This was an attempt to put the value that's in Cells(FinalRow, CYGP) into my active cell, but it's not working...Can any of you VBA gurus please help?
For example, I have the following code:
FinalRow = Cells(65536, 1).End(xlUp).Row
CYGP = Cells(Final Row, 11).Column
Cells(FinalRow + 2, CYGP).Select
I now need to be able to use the value that's located in the selected cell elsewhere in the spreadsheet. I've tried the following:
ActiveCell.FormulaR1C1 = "=R[FinalRow]C[CYGP]
This was an attempt to put the value that's in Cells(FinalRow, CYGP) into my active cell, but it's not working...Can any of you VBA gurus please help?