Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob_F_Roecker
 
Posts: n/a
Default Does True Have a Numerical Value

OK I know that I could convert "true" to a numerical value with my own
formula but let's say I'm using the COUNTIF() function and it comes back
TRUE. Does TRUE have a numerical value?

I know that when I use the DELTA() funciton and two things equal it returns
a "1"

I'm not making a spreadsheet now that actually applies this. Just working
on something in my head for further knowledge.

What I'm hoping is that TRUE=1 and 0=FALSE. But I'm probably not so lucky.
They're probably NOT interchangable for a reason and I'd just like to know
why.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Does True Have a Numerical Value

If you calculate with TRUE or FALSE they return 1 and 0
That is the whole idea behind array formulas, however the only way
countif can return TRUE is if you use a condition like

=COUNTIF(A2:A10,"x")0

and if you for instance have 10 TRUE in C1:C10

=SUM(C1:C10)

will return 0 however if you add -- into the mixture like in

=SUM(--C1:C10)

and enter it with ctrl + shift & enter it will return 10



--
Regards,

Peo Sjoblom

(No private emails please)


"Jacob_F_Roecker" wrote in message
...
OK I know that I could convert "true" to a numerical value with my own
formula but let's say I'm using the COUNTIF() function and it comes back
TRUE. Does TRUE have a numerical value?

I know that when I use the DELTA() funciton and two things equal it
returns
a "1"

I'm not making a spreadsheet now that actually applies this. Just working
on something in my head for further knowledge.

What I'm hoping is that TRUE=1 and 0=FALSE. But I'm probably not so
lucky.
They're probably NOT interchangable for a reason and I'd just like to know
why.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Does True Have a Numerical Value

Hi Jacob

In addition to the advice given by Peo, you can convert your original True's
to 1's and False's to 0's by using the double unary operator --.

= --TRUE will return a 1
=--(COUNTIF(A2:A10,"x")0) will also return a 1 rather than TRUE,
hence you can sum the True's (1's) without having to resort to an array
formula.
--
Regards

Roger Govier


"Jacob_F_Roecker" wrote in message
...
OK I know that I could convert "true" to a numerical value with my own
formula but let's say I'm using the COUNTIF() function and it comes back
TRUE. Does TRUE have a numerical value?

I know that when I use the DELTA() funciton and two things equal it
returns
a "1"

I'm not making a spreadsheet now that actually applies this. Just working
on something in my head for further knowledge.

What I'm hoping is that TRUE=1 and 0=FALSE. But I'm probably not so
lucky.
They're probably NOT interchangable for a reason and I'd just like to know
why.




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
Return Numerical Label for LAST value Subtracted to reach Sum Target Value Sam via OfficeKB.com Excel Worksheet Functions 17 October 31st 05 01:46 PM
Summing "False" and "True" Jeff Excel Discussion (Misc queries) 7 August 25th 05 03:50 AM
True to TRUE Nikki@CustomMortgageSolutions Excel Discussion (Misc queries) 3 June 14th 05 05:35 PM
Grand Totals @ Same Place Amber M Excel Worksheet Functions 2 December 30th 04 07:13 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 12:22 PM.

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"