#1   Report Post  
PW11111
 
Posts: n/a
Default COUNTIF Problems


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
  #2   Report Post  
Damon Longworth
 
Posts: n/a
Default

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


"PW11111" wrote in message
...

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with sumif and countif Simon Shaw Excel Discussion (Misc queries) 6 July 23rd 05 10:02 PM
COUNTIF formula problems artisanpp Excel Discussion (Misc queries) 2 June 5th 05 01:30 AM
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


All times are GMT +1. The time now is 12:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"