#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default count function

I want to count cells going across but do not want to count that cell if it
is blank or has a 0
Example =count(e4:I4) the answer returns 5 however in cell f there is no
data so the answere should be 4. how can i write a formula so if the cell is
blank or has 0 it does not count that cell.

thanks

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200805/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default count function

Try this:

=COUNTIF(E4:I4,"<") - COUNTIF(E4:I4,0)

The first term will ignore blanks and the second term will count the
zeros and subtract them.

Hope this helps.

Pete

On May 6, 1:47*am, "Darts via OfficeKB.com" <u19990@uwe wrote:
I want to count cells going across but do not want to count that cell if it
is blank or has a 0
Example =count(e4:I4) the answer returns 5 *however in cell f there is no
data so the answere should be 4. *how can i write a formula so if the cell is
blank or has 0 it does not count that cell.

thanks

--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/ms-excel/200805/1


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default count function

thanks works great!!!

now what if I have no how can i tell it not to count no but have it count yes

Pete_UK wrote:
Try this:

=COUNTIF(E4:I4,"<") - COUNTIF(E4:I4,0)

The first term will ignore blanks and the second term will count the
zeros and subtract them.

Hope this helps.

Pete

I want to count cells going across but do not want to count that cell if it
is blank or has a 0

[quoted text clipped - 6 lines]
--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/ms-excel/200805/1


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200805/1

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
Another which count function? Johnny1r Excel Worksheet Functions 7 February 24th 08 03:52 AM
COUNT Function Richard New Users to Excel 3 March 12th 07 04:38 PM
which count function? y_not Excel Discussion (Misc queries) 6 March 23rd 06 07:24 AM
i need help with the "count" function kippercat Excel Worksheet Functions 1 March 9th 05 09:58 AM
Sum and Count Function Daniell Excel Worksheet Functions 0 November 2nd 04 12:03 AM


All times are GMT +1. The time now is 03:18 PM.

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

About Us

"It's about Microsoft Excel"