A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

COUNT BLANK AND ZERO AS THE SAME THING



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2010, 02:57 PM posted to microsoft.public.excel.worksheet.functions
jjlang
external usenet poster
 
Posts: 1
Default COUNT BLANK AND ZERO AS THE SAME THING

I'm writing an IF function and want my formula to return a 1 if the cell has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank or
has 0 in it.


Thnanks
  #2  
Old April 9th, 2010, 03:19 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default COUNT BLANK AND ZERO AS THE SAME THING

=COUNT(A:A)-COUNTIF(A:A,0)


"jjlang" wrote:

I'm writing an IF function and want my formula to return a 1 if the cell has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank or
has 0 in it.


Thnanks

  #3  
Old April 9th, 2010, 03:21 PM posted to microsoft.public.excel.worksheet.functions
adam6b
external usenet poster
 
Posts: 2
Default COUNT BLANK AND ZERO AS THE SAME THING

=if(or(A2=0,A2=""),0,1)

"jjlang" wrote:

I'm writing an IF function and want my formula to return a 1 if the cell has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank or
has 0 in it.


Thnanks

  #4  
Old April 9th, 2010, 03:21 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default COUNT BLANK AND ZERO AS THE SAME THING

One way...

=--AND(COUNT(A1),A10)

--
Biff
Microsoft Excel MVP


"jjlang" wrote in message
...
I'm writing an IF function and want my formula to return a 1 if the cell
has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank
or
has 0 in it.


Thnanks



  #5  
Old April 9th, 2010, 03:23 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default COUNT BLANK AND ZERO AS THE SAME THING

You can use this IF formula...

=IF(AND(ISNUMBER(A1),A10),1,0)

or you can use this shorter non-IF formula instead...

=--AND(ISNUMBER(A1),A10)

--
Rick (MVP - Excel)



"jjlang" wrote in message
...
I'm writing an IF function and want my formula to return a 1 if the cell
has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank
or
has 0 in it.


Thnanks


  #6  
Old April 9th, 2010, 03:23 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default COUNT BLANK AND ZERO AS THE SAME THING

On Fri, 9 Apr 2010 06:57:01 -0700, jjlang
wrote:

I'm writing an IF function and want my formula to return a 1 if the cell has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank or
has 0 in it.


Thnanks


=if(a2=0,0,1)

or

=--(A20)

or

=(A20)*1
--ron
  #7  
Old April 9th, 2010, 03:23 PM posted to microsoft.public.excel.worksheet.functions
JP Ronse
external usenet poster
 
Posts: 105
Default COUNT BLANK AND ZERO AS THE SAME THING

Hi jj

Try something as

=COUNT(C26:C28)-COUNTIF(C26:C28,0)

With kind regards,

JP

"jjlang" wrote in message
...
I'm writing an IF function and want my formula to return a 1 if the cell
has
a number in it, but return a 0 if the cell is blank of has a zero in it.

ie Cell A1 would return 1 if A2 has 3 in it, but return 0 if A2 is blank
or
has 0 in it.


Thnanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:15 AM.


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