A Quick Solution With Goal Seek
There are times when you know the result you want from a formula but what you need to determine is the input value that will give you that result. Fortunately Excel has a great tool for this that is simple to use. It's called Goal Seek.
Anytime you need to produce a given result in one formula cell by adjusting the value of another cell, Goal Seek can save you a lot to trial and error.
To demonstrate this, let's use a simple example.
Say you have written two of three exams. On the first exam your mark was 67 and on the second it was 85. You have one more exam to write and you want to know what mark you'll need on your last exam to achieve a final mark of 80. Cell A1=67, cell A2=85, and cell A4 contains the formula =AVERAGE(A1:A3). Currently your average mark is 76 (i.e. the average of 67 and 85). Your final mark will be recorded in cell A3.