LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Bob P. and Roger G. -- IF(and(...IF(OR( vs. IF(Boolean

Hi Epinn

Well done or slightly corrupting the words of Pygmalion "I think he's
got it" <bg

Yes, "*" is the equivalent of AND and "+" is the equivalent of OR.
As far as I am aware, there is no difference between using either
solution.
Personally, I prefer the latter as there is just a single IF statement.

--
Regards

Roger Govier


"Epinn" wrote in message
...
Hi Bob and Roger (in alphabetical order),

I just want to let you know that gradually I am detaching Boolean from
SUMPRODUCT and I am learning to use Boolean outside of SUMPRODUCT.
However, I still need SUMPRODUCT as a stepping stone to write my
formula. You won't believe what I did.

Column A = age Column B = eye colour

I have this formula:

=IF(AND(A230,IF(OR(B2="blue",B2="brown"),1,0)=1), TRUE,FALSE)

But I don't like the 1, 0, AND, OR etc. Then I think: how would I write
it if it were SUMPRODUCT.

So I wrote my SUMPRODUCT formula using * and +, A2:A10, B2:B10 etc. as
if I was doing a count. When I was happy with my SP formula, then I
changed it to IF and converted the range back to a single cell (e.g.
A2). I ended up with the following:

=IF((A230)*((B2="blue")+(B2="brown")),TRUE,FALSE)

So, this is my "joke" of the day. Next time, I should be able to use
Boolean at will without using SP as a "bridge."

Do you prefer the second IF formula to the first? Are there any
circumstances when the first formula has an advantage over the second?
I should feel free to use Boolean, right?

Please feel free to comment and I don't need any guarantee on your
answers. <G

Epinn










 
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
Formating textbox on a chart Roger B. Charts and Charting in Excel 10 November 10th 06 02:17 AM
12 Month Average Dewayne Excel Worksheet Functions 10 November 6th 06 09:18 PM
Help with lookup Bob Excel Discussion (Misc queries) 10 September 23rd 06 08:19 AM
Getpivotdata - able to reference to another cell all parameters but not the datafield Roger The Rabbit Excel Discussion (Misc queries) 6 September 3rd 06 03:10 PM
Formulas, question for Roger Govier BigBuck98 Excel Worksheet Functions 2 January 10th 06 03:28 PM


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

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"