Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 238
Default IF/AND worksheet function

How do I word a worksheet function where both of these is true,
IF C18=C20 AND IF C18=C16
gives a 1, not it gives a 0
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default IF/AND worksheet function

AND is be used as below..all the conditions inside braces ()
=IF(AND(C18=C20,C18=C16),1,0)

Here even if these cells are blank; it will return 1. If you want to avoid
this add one more condition within AND...
=IF(AND(C18<"",C18=C20,C18=C16),1,0)

If this post helps click Yes
---------------
Jacob Skaria


"Fan924" wrote:

How do I word a worksheet function where both of these is true,
IF C18=C20 AND IF C18=C16
gives a 1, not it gives a 0

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default IF/AND worksheet function

=(C18=C20)*(C18=C16)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Fan924" wrote in message
...
How do I word a worksheet function where both of these is true,
IF C18=C20 AND IF C18=C16
gives a 1, not it gives a 0


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default IF/AND worksheet function

Hi,
=if(and(c18=c20,c18=c16),1,0)

"Fan924" wrote:

How do I word a worksheet function where both of these is true,
IF C18=C20 AND IF C18=C16
gives a 1, not it gives a 0

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 238
Default IF/AND worksheet function

Thanks, works great.
How about something more complex? I get an error with all I try

IF(AND(C10=C12,C10=C8),1,0) OR IF(AND(C10=C12,C10=C14),1,""),1,0)
returns a 1 of 0


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default IF/AND worksheet function

Try the below...The new condition is again within the same IF

=IF(OR(AND(C10=C12,C10=C14),AND(C10=C12,C10=C8)),1 ,0)

OR

=IF(AND(C10=C12,OR(C10=C14,C10=C8)),1,0)


If this post helps click Yes
---------------
Jacob Skaria


"Fan924" wrote:

Thanks, works great.
How about something more complex? I get an error with all I try

IF(AND(C10=C12,C10=C8),1,0) OR IF(AND(C10=C12,C10=C14),1,""),1,0)
returns a 1 of 0

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
worksheet function... SteveDB1 Excel Worksheet Functions 7 February 2nd 09 07:09 PM
Worksheet Function grobertson Excel Worksheet Functions 1 June 8th 07 05:55 PM
Reference the worksheet from a multiple worksheet range function ( DBickel Excel Worksheet Functions 1 May 28th 05 03:49 AM
IF Worksheet Function JB Excel Worksheet Functions 5 May 24th 05 11:21 PM
Can the offset worksheet function reference another worksheet AlistairJ Excel Worksheet Functions 2 May 9th 05 06:18 PM


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