View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_] Rowan Drummond[_3_] is offline
external usenet poster
 
Posts: 414
Default Cell that shows "sum" of filled cells?

Countif only takes two arguments so you could do it like this:
=COUNTIF(B3:H3,"0")+COUNTIF(B6:H6,"0")+COUNTIF(B 9:H9,"0")+COUNTIF(B12:H12,"0")+COUNTIF(B15:H15," 0")*COUNTIF(B18:H18,"0")

Hope this helps
Rowan

StargateFanFromWork wrote:
"StargateFanFromWork" wrote in message
...

"Toppers" wrote in message
...

Hi,

Look at COUNTA or COUNTIF functions.

HTH


Sure did. I ended up using COUNTA and it worked like a charm. Thanks.


:oD

Actually, I went back to look at COUNTIF because with COUNTA, I'd have to
leave a cell blank if I didn't want it to be counted rather than putting a
hyphen in, or even "0". Either of these would be better than leaving
pertinent cells blank yet either of these would be counted in the total
something I didn't realize would happen though I should have, looking at
this in hindsight.

COUNTIF sounds like it would do the job but I ran into an error with my
formula so know I'm doing something wrong.

=COUNTIF(B3:H3,B6:H6,B9:H9,B12:H12,B15:H15,B18:H18 ,"0")

I guessed and used the "0" but I could be wrong. Also, after typing this
all in myself and after getting the error, I used the help method for
putting in the formula and the formula was identical to the one I initially
put in. Both methods returned the same error code.

Where am I going wrong above, pls? Thanks! :oD


"StargateFanFromWork" wrote:


Is there a function in Excel that will take cell fills and tally up


the

count of each one to get a total of cell fills?

i.e., if we have a time sheet sort of spreadsheet, every time we put


in

"7.5

hours", or whatever, in a cell, tied in to a date, that a cell at the


bottom

of the page that says "# of days worked" will calculate the total #


of

days

worked based on how many cells in the month were filled?

If so, what would this be called, pls? I could find code for doing


this

type of thing if I could figure out what this type of thing was


called.

Thanks much. :oD