I have tried to automate the goal seek function on my excel file. Looked at a code on youtube and tried to use it. It works perfectly till I add the last few names created to the range. I have checked the names and they exist with no typos.
As soon as I add the following "TWOtargetvalue, TWOsetcell, TWOchangecell" to the below formula it give me a Run-time error '1004'range of object _worksheet failed
Set inputcells = Range("INFTargetvalue, INFsetcell, INFchangecell, FXTargetvalue, FXsetcell, FXchangecell, MFOBtargetvalue, MFOBsetcell, MFOBchangecell," & _
"CORtargetvalue, CORsetcell, CORchangecell, OPTtargetvalue, OPTsetcell, OPTchangecell, ONEtargetvalue, ONEsetcell, ONEchangecell," & _
"TWOtargetvalue, TWOsetcell, TWOchangecell")
This is the formula I am using the range for
Range(Range("TWOsetcell").Value).goalseek Goal:=Range("TWOtargetvalue"), _ ChangingCell:=Range(Range("TWOchangecell").Value)
Can someone please help me! Any advice would be appreciated.. Thanks!