COUNTIF Problems

G

Guest

Hi,

I have the following formula:

=IF(ISERROR(COUNTIF(StatusCheck, "Snag Item")/COUNTIF(ElementCount,"Main
Contractor - Builderswork")),0,COUNTIF(StatusCheck, "Snag
Item")/COUNTIF(ElementCount,"Main Contractor - Builderswork"))

Originally I had some problems getting ISERROR to work properly - but this
is sorted now.

The formula is supposed to count the number of times a snagging item is
added into the spreadsheet (each snagging item has its own row) that is
assigned a status of "Snag Item" and an Element of "Main -Contractor -
Builderswork". The formula works fine for one item - but if two or more are
added the formula returns 1.

Any ideas why this is not working.?

Cheers,

Phil
 
D

Damon Longworth

What do you mean by "two or more are added"?

I am guessing you were getting an error because the formula was dividing by
zero. You could check for zero instead of duplicating the entire formula.
Not a big deal unless you have a large file with many formula.

Try:

=IF(COUNTIF(ElementCount,"Main Contractor -
Builderswork")<>0,COUNTIF(StatusCheck, "Snag
Item")/COUNTIF(ElementCount,"Main Contractor - Builderswork"))


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

COUNTIF - #DIV/01 7
COUNTIF 6
countif 6
Sorting and COUNTIF 6
COUNTIF, Sorting, on Two Sheets 1
wildcard in countif formula that uses cell references 3
Countif wildcards & 2 criteria 5
Countif Problem 3

Top