View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default SUM to infinity on a column

As a matter of interest, why are you using SUM()? Why not just =A1-B1? SUM
is a function that adds a number of values. If you wanted you could use
=SUM(A1,-B1), but with only one argument as you've got it the function does
nothing.

You could equally have used =PRODUCT(A1-B1) or =AVERAGE(A1-B1) or
=MEDIAN(A1-B1) or =MAX(A1-B1) or =MIN(A1-B1) or probably a few others, but
in each case the function is redundant with only one argument.
--
David Biddulph

"Bobby" wrote in message
oups.com...
Hi,
I have a spreadsheet which is generated by an export from Access.
Column C does not come from Access and is a totals column, basically
Column A - Column B. I have put some conditional formatting on Column
C so that it is red if the value is negative and green if positive. I
have put a calculaion in Column C which is, "=sum(A1-B1)". I realise
that if I drag Column C down, then each cell will become "=sum(A2-B2)"
and "=sum(A3-B3)" etc.

However, my problem is I have no way of knowing how many rows will be
in the spreadsheet. It could be 10 or it could be 10,000. Is there
anyway that I can make Column C always reaslise that it will be Column
A - Column B on the same row, bearing in mind that row 1 is the
header and cannot be included in the calculation?

Thanks for your help

Bobby