Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Explaination of Logical If Then Statement

Can anyone explain to me why the following logical statement has the AND
placed at the very beginning of the statement?

=IF(AND($E964="",I964=""),"",IF($E964="",I964,IF($ G964="",I964,MROUND(I964,$G964))))

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Explaination of Logical If Then Statement

there are 3 arguments to an IF statement, the argument, what to do if true,
and what to do if false.

the AND portion of this formula is your argument.

in order to display "" (nothing) the argument must be true, in order for the
argument to be true, both tests must be true (since AND, if OR were used,
only 1 of them would need to be true). The tests are $E964="" and I964="", so
if both are blank, then the first IF is TRUE, displays "" (nothing) and is
done.
--
John C


"Mitchell" wrote:

Can anyone explain to me why the following logical statement has the AND
placed at the very beginning of the statement?

=IF(AND($E964="",I964=""),"",IF($E964="",I964,IF($ G964="",I964,MROUND(I964,$G964))))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Explaination of Logical If Then Statement

Hi

Its doing this

=IF(AND($E964="",I964=""),"",
if both these cell are empty do nothing

IF($E964="",I964
if E964 is empty return I964

IF($G964="",I964
if G964 is empty return I964

MROUND(I964,$G964))))
If none of the above are tru round I964 to the nearets multiple of G964


Why is another question

Mike

"Mitchell" wrote:

Can anyone explain to me why the following logical statement has the AND
placed at the very beginning of the statement?

=IF(AND($E964="",I964=""),"",IF($E964="",I964,IF($ G964="",I964,MROUND(I964,$G964))))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Explaination of Logical If Then Statement

On Jul 18, 11:47 am, Mitchell
wrote:
Can anyone explain to me why the following logical statement has the AND
placed at the very beginning of the statement?

=IF(AND($E964="",I964=""),"",IF($E964="",I964,IF($ G964="",I964,MROUND(I964,$G964))))


It's to tell Excel to get to the answer quickly that if both $E964 and
I964 are "", then return a "" and don't bother figuring the rest of
the formula.
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
If Statement with Two Different Logical Test Storm Excel Worksheet Functions 16 December 15th 08 07:22 PM
Logical statement for 'contains' ? Singh Excel Discussion (Misc queries) 1 May 16th 08 03:33 PM
IF STATEMENT - HOW TO STRUCTURE THE LOGICAL OPERATORS SSJ New Users to Excel 8 April 9th 07 11:15 AM
Logical Statement Harley Excel Discussion (Misc queries) 1 January 4th 07 02:37 AM
3 logical condition if statement Mikehughes Excel Worksheet Functions 3 July 19th 06 01:59 PM


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