Hi,
Novice here. I want to write a "what if" goalseek macro where the row I want to use for the goal changes based on a person's age. I did a "MATCH" function to determine the correct row, but I don't know how to write the macro. It works fine if I just run the what if function, so I know it can be done. Please advise.
Sub Calca()
'
' Calca Macro
'
' Keyboard Shortcut: Ctrl+a
'
Sheets("Sheet3").Range("D"& "c35").GoalSeek Goal:=10000, ChangingCell:=Range(
"D32")
End Sub
Novice here. I want to write a "what if" goalseek macro where the row I want to use for the goal changes based on a person's age. I did a "MATCH" function to determine the correct row, but I don't know how to write the macro. It works fine if I just run the what if function, so I know it can be done. Please advise.
Sub Calca()
'
' Calca Macro
'
' Keyboard Shortcut: Ctrl+a
'
Sheets("Sheet3").Range("D"& "c35").GoalSeek Goal:=10000, ChangingCell:=Range(
"D32")
End Sub