Excel VBA Goalseek -


i trying leverage goalseek command in vba in excel spreadsheet. have value in f3, f7, , f18. when change value in f3 error back:

run-time error '1004': reference not valid

here code

private sub worksheet_change(byval target range) worksheets("mdl") if target = range("f3")      range("f3").goalseek goal:=range("f7"), changingcell:=range("f18")   end if end end sub 

the goalseek requires formula in cell creating it, if change range("f3") value instead of formula error appear.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -