I have a string variable (myCell) that contains a cell address (i.e. $A$66)
I have a Range variable (mrR1) that I want to give that value to.
I cannot figure out how to do it. Can anyone help?
After that, I'm hoping to use the Range variables in a Goal Seek.
I have a Range variable (mrR1) that I want to give that value to.
I cannot figure out how to do it. Can anyone help?
After that, I'm hoping to use the Range variables in a Goal Seek.
Code:
Private Sub CommandButton1_Click()
Dim myMatch As Double
Dim myCell As String
Dim myStart As Range
Dim myIRR As String
Dim myR1 As Range
Dim myR2 As Range
myMatch = WorksheetFunction.Match(0.25, Range("K67:DZ67"))
myCell = Range("HurdleStart").Offset(0, myMatch).Address
myIRR = Range("IRRStart").Offset(0, myMatch).Address
' myR1 = myIRR value
' myR2 = myCell value
Range(myR1).GoalSeek Goal:=0.25, ChangingCell:=Range(myR2)
End Sub