Thread: Testing Cells
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 698
Default Testing Cells

Sorry.....I couldn't determine those criteria from your post.

Try something like this:
=COUNTIF(YourRange,"0")-COUNTIF(YourRange,"=6")

Or...if you feel like something fancier:
=SUM(COUNTIF(YourRange,{"0","=6"})*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Paul" wrote:

I tried it but is returning 0. I need it to return the number of cells with
a value great than zero and less than 6. So if I have cells in my range
with 1, 3, 5, 7, 4, the formula should return 4.

"Ron Coderre" wrote in message
...
Try this:

=SUM(COUNTIF(YourRange,{"0",6}))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Paul" wrote:

I probably wasn't clear, I want to return a count of the number of cells
that meet that criteria.

"Paul" wrote in message
...
I am trying to test and count non-contiguous cells in form our HR
department made. There are to be numerical values entered in these
cells,
but not every cell. I figured I could use CountIf, but I'm a little
rusty
on Excel. Something like: =CountIf([Referenced Cells], AND(0, ,6)) but
I
keep getting an error. Any help would be appreciated.

Thanks

Paul