Hi,
I've tried to get this solved previously, and did get some good suggestions that I thought I could use to get to my ideal solution, but I seem to be missing a bit of logic somewhere and need help (Again) (I'm very new to VBA)
Here's the deal. You have a number between 1 and 999 (We'll call it x) which I need to work out, in less than 8 attempts.
There are levels of feedback to help me with the next guess which range from -3 to +3 including 0, so +3 means the number is way too high, +2 is too high. +1 a bit high, and so on.
If the feedback is 0 level, this means that I am +/- 50 away from x
Can any advise on what I need to do to the coding on the attached sheet to help me get to my goal. Essentially what I need is to get a situation where I have a guess of lets say 651 which the feedback is level 1, and a guess of 650, which is feedback zero. I can then deduce that the actual value of x is 600.
I hope I've explained this OK, or is there a better / easier way to do it??
Private Sub CommandButton2_Click()
If Range("d22") <> 0 Then
Range("c23") = Range("c22") + (Range("d22") * -1) * (Range("b9") / 2)
Else
Range("c23") = (Range("b9") / 2) + Range("c22")
End If
End Sub
Bookmarks