Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default True / false output problem

Hi there

trying to do a formula based on true/false output but I cant get round this

Team A(B1) v(D1)Team B

IF SUM(B1D1) say 1 - 0 {if true = 1 if false = 0}
IF SUM(B1<D1) say 0 - 1 {if true = 1 if false = 0}

No problem threre.. BUT

IF SUM (B1=D1) say 0 -0 or 1 -1 {if true = 1 if false =0}OK but
the trouble is if blank in both cells still shows 1 I need it to show 0
false
basically if b1=" " and D1=" " then false = 0

Please help I can't solve it - pulling my hair out what little I have left.

Cheers
Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default True / false output problem

On Wed, 9 Jun 2004 06:55:33 +0100, "paul thomas"
wrote:

Hi there

trying to do a formula based on true/false output but I cant get round this

Team A(B1) v(D1)Team B

IF SUM(B1D1) say 1 - 0 {if true = 1 if false = 0}
IF SUM(B1<D1) say 0 - 1 {if true = 1 if false = 0}

No problem threre.. BUT

IF SUM (B1=D1) say 0 -0 or 1 -1 {if true = 1 if false =0}OK but
the trouble is if blank in both cells still shows 1 I need it to show 0
false
basically if b1=" " and D1=" " then false = 0

Please help I can't solve it - pulling my hair out what little I have left.

Cheers
Paul


Your example is a bit confusing.

You state that if the cells are blank, that you want to show a 0.

But your formula has you looking for a <space (" ") in those cells. If you
truly want the cell to be blank, you need to check with the ISBLANK function.
If you want to check for a null string, you need to use the "" (without a
space) construct.

Obviously if both cells are blank, contain a space, or contain a null string
they will be equal; so you need to explicitly check for what it is you want to
test. One formula that checks for a null string (which test TRUE if the cell
is blank, or if there is a formula in it that returns a null string) is:

=(B1=D1)*(B1<"")*(D1<"")


--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default True / false output problem

Ron

Absolute Hero - Worked a treat.

Thankyou for your help. (Just investing in the old hair restorer now :-)

Paul

"Ron Rosenfeld" wrote in message
...
On Wed, 9 Jun 2004 06:55:33 +0100, "paul thomas"


wrote:

Hi there

trying to do a formula based on true/false output but I cant get round

this

Team A(B1) v(D1)Team B

IF SUM(B1D1) say 1 - 0 {if true = 1 if false = 0}
IF SUM(B1<D1) say 0 - 1 {if true = 1 if false = 0}

No problem threre.. BUT

IF SUM (B1=D1) say 0 -0 or 1 -1 {if true = 1 if false =0}OK but
the trouble is if blank in both cells still shows 1 I need it to show 0
false
basically if b1=" " and D1=" " then false = 0

Please help I can't solve it - pulling my hair out what little I have

left.

Cheers
Paul


Your example is a bit confusing.

You state that if the cells are blank, that you want to show a 0.

But your formula has you looking for a <space (" ") in those cells. If

you
truly want the cell to be blank, you need to check with the ISBLANK

function.
If you want to check for a null string, you need to use the "" (without a
space) construct.

Obviously if both cells are blank, contain a space, or contain a null

string
they will be equal; so you need to explicitly check for what it is you

want to
test. One formula that checks for a null string (which test TRUE if the

cell
is blank, or if there is a formula in it that returns a null string) is:

=(B1=D1)*(B1<"")*(D1<"")


--ron



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default True / false output problem

On Wed, 9 Jun 2004 18:24:44 +0100, "paul thomas"
wrote:

Worked a treat.

Thankyou for your help. (Just investing in the old hair restorer now :-)


Thank you for the feedback. But also consider what you'll save in barber
bills!


--ron
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
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
Search for 2 true arguments and return true or false David Excel Discussion (Misc queries) 3 July 15th 06 10:18 AM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
Reverse false and combine with true true value Emmie99 Excel Worksheet Functions 5 August 17th 05 04:38 PM
True Or False, no matter what... it still displays the false statement rocky640[_2_] Excel Programming 2 May 13th 04 04:57 PM


All times are GMT +1. The time now is 07:15 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"