nalij_bond
New Member
- Joined
- Jan 27, 2023
- Messages
- 8
- Office Version
- 2013
- Platform
- Windows
Thanks all in advance for your time and help.
My Issue: I am trying to define a variable and use that value to append to a formula within a cell
Current Code:
Expected Result: What I would like to happen is in the 'Key Stakeholders' worksheet, in cell H6 - a formula like "='PoC Doc Template'!L12" is created.
Current Result: As of now, I keep receiving a Debug Error on the Sheets("Key Stakeholders").Range("H6").Formula = "='PoC Doc Template'!" & VHI_Ref line of code.
Any help would be greatly appreciated!
My Issue: I am trying to define a variable and use that value to append to a formula within a cell
Current Code:
VBA Code:
Sub test3()
'In the PoC Doc Template, use the address function to find the cell reference column in row 10.
'for the term "VHI PMO/GTM". Then in the Sheet 'Key Stakeholders' in cell H6, use the cell
'reference found and append to the formula'
Dim VHI_Ref
VHI_Ref = "ADDRESS(12,MATCH(""VHI PMO/GTM"",'PoC Doc Template'!R10,0))"
Sheets("Key Stakeholders").Range("H6").Formula = "='PoC Doc Template'!" & VHI_Ref
End Sub
Expected Result: What I would like to happen is in the 'Key Stakeholders' worksheet, in cell H6 - a formula like "='PoC Doc Template'!L12" is created.
Current Result: As of now, I keep receiving a Debug Error on the Sheets("Key Stakeholders").Range("H6").Formula = "='PoC Doc Template'!" & VHI_Ref line of code.
Any help would be greatly appreciated!