View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Powlaz
 
Posts: n/a
Default Sumif Cells Are Not Blank

Kevin,

I looked at everything again and I'm afraid I'm not where I need to be.
Bear with me. I'm not sure if I worded my question well enough.

I have a table in which each column represents a month. The first line of
each column is a total of the 7 lines below it. The last column is an
average of each monthly total.

1st. I'd like to keep a running average of the totals in each month. If
there is no value entered in the 'Total' cell for a month I don't want "0" to
show up. Using the statement you gave me before all of my 0's went away when
the 'Total' cells were blank. When I entered a total into January (b6) the
average calcualted in AA6. But when I entered a total into February (d6) the
average in AA6 disappeared. What's the fix?

2nd. I'd like to keep a running total of jobs for the month. In January
these would be cells a7:a13. If I just use SUM there is a 0 in a14 until
data is entered into one of the cells a7:a13. I'd like a14 to stay blank and
calculate a total as each cell is populated:

a7 = 5
a14= 5

a7=5
a8=5
a14=10 ---and so on.

What am I missing?

PO

"Kevin Vaughn" wrote:

=IF(COUNTIF(SumRange,"=0")=ROWS(SumRange),SUM(Sum Range),"")
My sumrange was a1:a10 so rows(sumrange) returns 10. The countif will count
the number of occurences where the cells in sumrange = 0. If all of the
cells meet the criteria, this will equal 10. Therefore the true portion of
the IF statement will be returned which is SUM(Sumrange). Otherwise ""
(nothing) will be returned. This per your latest request to have "" shown
rather than ).

HTH
--
Kevin Vaughn


"Powlaz" wrote:

Kevin, Andy, thanks for the quick responses. Both of your formulas worked
(as far as I can tell). I'm interested in understanding how they work if you
could offer a quick explanation.

Moreso, I need a little more help. Both the formulas returned a 0 when
summing a range of blank cells. Here's the issue, this spreadsheet is pre -
formatted for a year's worth of data. I'd like for the cells in an unused
month to remain blank until the data is entered (and subsequently
calculated).

There is currently no user added data in cells b6:b12. But cell b13 that
calculates the total of b6:b12 shows 0. I'd like it to be blank until data
is entered into b6:b12. How can I concisely do that?

I thought about using IF and OR functions combined so that each cell is
checked for a value greater than "" before it will calculate the total of the
cells but it's very long and I think inefficient.

Got anything else?

Thanks

PO
"AndyB" wrote:

Hi

Try something like this:
=SUMPRODUCT((D7:G70)*(D7:G7))

AndyB

"Powlaz" wrote in message
...
I'm looking to total a range of cells ONLY if they have a value of 0 or
more
entered in them. In plain english:

Sumif A1 is =0
Sumif A2 is =0
Sumif A3 is =0

and so on. Where every cell in the range must have a value of 0 or more
entered before the function will return a result. How do I do this?

Thanks,

PO