#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF, then

How do I write the formula for "If A1 is true, then B1 is also true and the
result = A1+B1
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default IF, then

Try this example will test if A1=1 And B1=2 Then Sum A1 + B1 =3
=IF(AND(A1=1,B1=2),A1+B1,"False")



"Puffin1" wrote:

How do I write the formula for "If A1 is true, then B1 is also true and the
result = A1+B1

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default IF, then

XL interprets any non-zero numeric value as TRUE and zero as FALSE, so,
literally:

=IF(AND(A1<0,B1<0),A1+B1,"Something else")

OTOH, XL coerces TRUE to 1 in math formulae and FALSE to 0, so "if A1 is
true then B1 is also true" translates to

B1: =IF(A1=TRUE, TRUE, "Something Else")

and

result = IF(A1=TRUE, A1+B1,"Something Else Again")

which will always return 2 (TRUE+TRUE=== 1+1).


In article ,
Puffin1 wrote:

How do I write the formula for "If A1 is true, then B1 is also true and the
result = A1+B1

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



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