I have a column with some figures not every line contains a number, those that don't are blank. Now I would like a total at the bottom that subtracts the figure nearest the bottom from the figure nearest the top. eg if colum A contains 100, 98, blank, 56, 42,blank,blank, 38. The I want the total to be 100-38=62. Thanks
Yes that's also true...I would usually type =100- and then click the cell so it finishes the sum automatically for me (that's my excuse for forgetting the parenthesis....)
no I don't want to add up the column, no they are are not always in descending order. basically I want to subtract the last value in the column from the first. The number of rows is constantly changing so lines can be added at the end or in the middle. eg =A1-An would work now but later If lines are added after line N then it would not.
Is the position of the top number variable as well? If it is this may not work. If it is fixed, try this. In the cell where you want the answer eneter this formula:
=A1-(INDEX(A1:A9999,MATCH(9.9999E+307,A1:A9999)))
This should give you the result of A1 minus the last cell with an entry in the range A1:A9999.
Should have said that the formula needs to be somewhere other than between A1 and A9999 (say, B1 for instance). That's probably why you got the "circular reference".