A Microsoft Excel forum. ExcelBanter

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 » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Looking for BOOLEAN ALGEBRA functions (specifically XOR)



 
 
Thread Tools Display Modes
  #1  
Old July 21st 09, 07:01 PM posted to microsoft.public.excel.worksheet.functions
RL Jones
external usenet poster
 
Posts: 1
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

I am looking for BOOLEAN Algebra Functions. Can't find any help in EXCEL.
While I can work around the OR, AND, and NOT, I need XOR.
Ads
  #2  
Old July 21st 09, 07:27 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 11,501
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

Hi,

Excel doesn't have it but you can write your own quite simply

=IF(COUNTIF(A1:B1,"Some Value")=1,TRUE,FALSE)

Mike


"RL Jones" wrote:

> I am looking for BOOLEAN Algebra Functions. Can't find any help in EXCEL.
> While I can work around the OR, AND, and NOT, I need XOR.

  #3  
Old July 21st 09, 07:27 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein
external usenet poster
 
Posts: 5,934
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

I'm pretty sure this is it...

=OR(AND(A1,NOT(B1)),AND(NOT(A1),B1))

--
Rick (MVP - Excel)


"RL Jones" <RL > wrote in message
...
>I am looking for BOOLEAN Algebra Functions. Can't find any help in EXCEL.
> While I can work around the OR, AND, and NOT, I need XOR.


  #4  
Old July 21st 09, 08:08 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 11,501
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

Rick,

Can be abbreviated to:-

=(A1<>0)+(B1<>0)=1

and it also works if both cells are blank.

Mike

"Rick Rothstein" wrote:

> I'm pretty sure this is it...
>
> =OR(AND(A1,NOT(B1)),AND(NOT(A1),B1))
>
> --
> Rick (MVP - Excel)
>
>
> "RL Jones" <RL > wrote in message
> ...
> >I am looking for BOOLEAN Algebra Functions. Can't find any help in EXCEL.
> > While I can work around the OR, AND, and NOT, I need XOR.

>
>

  #5  
Old July 21st 09, 08:20 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein
external usenet poster
 
Posts: 5,934
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

Ah, yes... very good. And I guess that could be written this way as well...

=NOT(A1)+NOT(B1)=1

--
Rick (MVP - Excel)


"Mike H" > wrote in message
...
> Rick,
>
> Can be abbreviated to:-
>
> =(A1<>0)+(B1<>0)=1
>
> and it also works if both cells are blank.
>
> Mike
>
> "Rick Rothstein" wrote:
>
>> I'm pretty sure this is it...
>>
>> =OR(AND(A1,NOT(B1)),AND(NOT(A1),B1))
>>
>> --
>> Rick (MVP - Excel)
>>
>>
>> "RL Jones" <RL > wrote in message
>> ...
>> >I am looking for BOOLEAN Algebra Functions. Can't find any help in
>> >EXCEL.
>> > While I can work around the OR, AND, and NOT, I need XOR.

>>
>>


  #6  
Old July 21st 09, 08:33 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 11,501
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

Yes it could and until Excel include

=XOR(A1,B1) then they are as short as it gets.

Mike

"Rick Rothstein" wrote:

> Ah, yes... very good. And I guess that could be written this way as well...
>
> =NOT(A1)+NOT(B1)=1
>
> --
> Rick (MVP - Excel)
>
>
> "Mike H" > wrote in message
> ...
> > Rick,
> >
> > Can be abbreviated to:-
> >
> > =(A1<>0)+(B1<>0)=1
> >
> > and it also works if both cells are blank.
> >
> > Mike
> >
> > "Rick Rothstein" wrote:
> >
> >> I'm pretty sure this is it...
> >>
> >> =OR(AND(A1,NOT(B1)),AND(NOT(A1),B1))
> >>
> >> --
> >> Rick (MVP - Excel)
> >>
> >>
> >> "RL Jones" <RL > wrote in message
> >> ...
> >> >I am looking for BOOLEAN Algebra Functions. Can't find any help in
> >> >EXCEL.
> >> > While I can work around the OR, AND, and NOT, I need XOR.
> >>
> >>

>
>

  #7  
Old July 21st 09, 10:47 PM posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_]
external usenet poster
 
Posts: 1,230
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

"Rick Rothstein" > wrote...
>Ah, yes... very good. And I guess that could be written this way as well...
>
>=NOT(A1)+NOT(B1)=1

....

If A1 and B1 would always be 1s or 0s, even shorter:

=MOD(A1+B1,2)
  #8  
Old July 21st 09, 11:03 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein
external usenet poster
 
Posts: 5,934
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

>>Ah, yes... very good. And I guess that could be written this way as
>>well...
>>
>>=NOT(A1)+NOT(B1)=1

> ...
>
> If A1 and B1 would always be 1s or 0s, even shorter:
>
> =MOD(A1+B1,2)


Provided the user didn't need to see the result of the operation as
TRUE/FALSE, of course.

--
Rick (MVP - Excel)

  #9  
Old July 22nd 09, 12:16 AM posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
external usenet poster
 
Posts: 1,180
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

An XOR could operate on any number of binary bits.
An odd parity checker would XOR all given bits,
thus checking for an odd number of bits in a word:
=MOD(1+MOD(HEX2BIN("AE")-1,9),2)
I vote for Harlan's formulas, having lifted them from
his post dated Jun 16, 2003.
  #10  
Old July 22nd 09, 05:21 AM posted to microsoft.public.excel.worksheet.functions
Dana DeLouis[_3_]
external usenet poster
 
Posts: 690
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

> ... until Excel include =XOR(A1,B1)

It's included as an Excel vba function.
I have no idea why it's not included as a Worksheet function.

b = a Xor b

= = = =
Dana DeLouis


Mike H wrote:
> Yes it could and until Excel include
>
> =XOR(A1,B1) then they are as short as it gets.
>
> Mike
>
> "Rick Rothstein" wrote:
>
>> Ah, yes... very good. And I guess that could be written this way as well...
>>
>> =NOT(A1)+NOT(B1)=1
>>
>> --
>> Rick (MVP - Excel)
>>
>>
>> "Mike H" > wrote in message
>> ...
>>> Rick,
>>>
>>> Can be abbreviated to:-
>>>
>>> =(A1<>0)+(B1<>0)=1
>>>
>>> and it also works if both cells are blank.
>>>
>>> Mike
>>>
>>> "Rick Rothstein" wrote:
>>>
>>>> I'm pretty sure this is it...
>>>>
>>>> =OR(AND(A1,NOT(B1)),AND(NOT(A1),B1))
>>>>
>>>> --
>>>> Rick (MVP - Excel)
>>>>
>>>>
>>>> "RL Jones" <RL > wrote in message
>>>> ...
>>>>> I am looking for BOOLEAN Algebra Functions. Can't find any help in
>>>>> EXCEL.
>>>>> While I can work around the OR, AND, and NOT, I need XOR.
>>>>

>>

 




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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering File Info Specifically Save Date or Print Date Gadgetgw Excel Discussion (Misc queries) 4 October 6th 08 08:43 PM
Compare Worksheet Templates-specifically validations, error messag edm Excel Discussion (Misc queries) 0 January 10th 07 10:57 PM
Algebra Irish3538 Excel Worksheet Functions 2 October 16th 06 06:15 PM
Sort a column (specifically email data) by end of text, not beginn Zip code help Excel Worksheet Functions 4 October 14th 05 07:13 PM
Time sheet set up specifically HT New Users to Excel 5 December 5th 04 05:56 PM


All times are GMT +1. The time now is 04:39 PM.


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