formula help

T

tahoe2008

I have a column of 15 cells of which 8 cells have have data
(J2-J16). The total of these cells is in (J18) and a goal numbe
(J22).

What I need is a formula that will take the total of the cells (J18)an
subtract it from the goal number (J22) and devide it by the number o
unused cells to give me an avrarge of what is needed to meet the goa
number. And as the unused cells are filled in with data the avarag
will change. So this formula has to take
inaccount for the 7 unsed cells as they decrease in number
 
M

mudraker

will show as a negative number if j18 greater then j22

=(J22-J18)/(15-COUNT(J2:J16)
 
J

JE McGimpsey

This might be enhanced a bit as

=IF(COUNT(J2:J16)<15,MAX(J22-J18,0)/(15-COUNT(J2:J16)),"")

which will prevent the #DIV/0 error when all 15 cells are filled, and
will show 0 if the goal is met before the end of the period.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top