Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default Evaluate boolean values as 1 or 0

How do I use boolean values so that a formula would evaluate TRUE as 1 and
FALSE as 0? For example, if column A contains boolean values, I want to
avoid formulas like {SUM(IF(A1:A100, 1, 0))}. Instead, I would like to just
enter {SUM(A1:A100)}. Presently, in such a formula both TRUE and FALSE are
treated as 0.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,533
Default Evaluate boolean values as 1 or 0

Hi

=COUNTIF(A1:A100,TRUE)

Regards,
Per

"hmm" skrev i meddelelsen
...
How do I use boolean values so that a formula would evaluate TRUE as 1 and
FALSE as 0? For example, if column A contains boolean values, I want to
avoid formulas like {SUM(IF(A1:A100, 1, 0))}. Instead, I would like to
just
enter {SUM(A1:A100)}. Presently, in such a formula both TRUE and FALSE
are
treated as 0.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Evaluate boolean values as 1 or 0

Try this:
{SUM(--(A1:A100))}

Regards,
Stefi

€˛hmm€¯ ezt Ć*rta:

How do I use boolean values so that a formula would evaluate TRUE as 1 and
FALSE as 0? For example, if column A contains boolean values, I want to
avoid formulas like {SUM(IF(A1:A100, 1, 0))}. Instead, I would like to just
enter {SUM(A1:A100)}. Presently, in such a formula both TRUE and FALSE are
treated as 0.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Evaluate boolean values as 1 or 0

In addition to the other replies, you can:

force the formulas that evaluate to to TRUE or FALSE to evaluate to 1 or 0
by multiplying the result by 1, or use

=SUMPRODUCT(a1:a100*1)

"hmm" wrote:

How do I use boolean values so that a formula would evaluate TRUE as 1 and
FALSE as 0? For example, if column A contains boolean values, I want to
avoid formulas like {SUM(IF(A1:A100, 1, 0))}. Instead, I would like to just
enter {SUM(A1:A100)}. Presently, in such a formula both TRUE and FALSE are
treated as 0.

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
custom format for boolean values yahee1266 Excel Discussion (Misc queries) 2 April 5th 23 02:59 PM
More on Boolean Epinn New Users to Excel 7 November 28th 06 09:29 AM
VBA Boolean Jeff Excel Discussion (Misc queries) 1 February 2nd 06 10:01 PM
Comparing text and returning boolean values nicoleeee Excel Discussion (Misc queries) 9 December 2nd 05 10:43 AM
I Need a formula to evaluate a cell with + or - values Bob in Oklahoma Excel Worksheet Functions 6 October 31st 05 02:41 PM


All times are GMT +1. The time now is 06:29 AM.

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"