ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   function explanation (https://www.excelbanter.com/excel-programming/325243-function-explanation.html)

Leesa

function explanation
 
There is an Excel spreadsheet with this function, can someone walk me through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )


Leesa

function explanation
 
Sorry meant to say I understand that if A2 does not equal nothing

"Leesa" wrote:

There is an Excel spreadsheet with this function, can someone walk me through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )


Bob Phillips[_6_]

function explanation
 
The logic is

IF
A2 not equal nothing AND B2 equal nothing
OR
A2 equal nothing and B2 not equal nothing
THEN
return F
ELSE
return nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Leesa" wrote in message
...
Sorry meant to say I understand that if A2 does not equal nothing

"Leesa" wrote:

There is an Excel spreadsheet with this function, can someone walk me

through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter

nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through

the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )




Shawn O'Donnell

function explanation
 
"Leesa" wrote:
=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )


Adding some white space to help parse it:

=IF(

OR(
AND(A2<"",B2=""),
AND(A2="",B2<"") ),

"F",
"")

The OR says that if either of those ANDs produces a true, the result if "F".
Otherwise, the result is "".

The AND statements say:

if B2 is empty but A2 isn't, or
if A2 is empty but B2 isn't

then "F". Otherwise "".

In other words, if either A2 or B2 is empty, but not both at the same time,
then "F".

This looks like something you'd have to produce by hand. It can be
difficult to write a function like this on-the-fly in the formula bar in
Excel. The color-coded parentheses help a bit, but not enough. Sometimes
you can build the expression piece by piece in other cells and paste the
parts into the final formula.

Fredrik Wahlgren

function explanation
 

"Leesa" wrote in message
...
There is an Excel spreadsheet with this function, can someone walk me

through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter

nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through

the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )



What you have is a kind of XOR or eXclusive OR function

/Fredrik




Tom Ogilvy

function explanation
 
Seriously, if the OP doesn't know how to interpret the nested OR/AND
construct, do you think saying it is an XOR function would shed much light
on it? <g

--
Regards,
Tom Ogilvy

"Fredrik Wahlgren" wrote in message
...

"Leesa" wrote in message
...
There is an Excel spreadsheet with this function, can someone walk me

through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter

nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through

the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )



What you have is a kind of XOR or eXclusive OR function

/Fredrik






Fredrik Wahlgren

function explanation
 

"Tom Ogilvy" wrote in message
...
Seriously, if the OP doesn't know how to interpret the nested OR/AND
construct, do you think saying it is an XOR function would shed much light
on it? <g

--
Regards,
Tom Ogilvy


Yes, I do. XOR is something you can search for. I think there are many sites
that provide good explanations as to why or when you should use it. I also
used the term "exclusive or" which I think should help in understanding the
intention of the function. We'll know for sure if Leesa replies.

Best Regards,
Fredrik




Dana DeLouis[_3_]

function explanation
 
Looks like another possible way to write this could be that if only one of
the two cells is blank, then enter 'F.
=IF(COUNTIF(A2:B2,"")=1,"F","")

... Also is this function able to be built through the
formula palette or wizard?


For some reason, only Vba has an Xor function. It's too bad it's not a
worksheet function.
--
Dana DeLouis
Win XP & Office 2003


"Leesa" wrote in message
...
There is an Excel spreadsheet with this function, can someone walk me
through
it in terms of how to interpret the first And and OR.

I understand that if A2 does not equal B2 "and" B2 = nothing enter
nothing
AND IF A2 = nothing "and" B2 is not equal to nothing enter nothing but
explain the first AND OR. Also is this function able to be built through
the
formula palette or wizard?

=IF(OR(AND(A2<"",B2=""),AND(A2="",B2<"")),"F","" )




Leesa

function explanation
 
Thanks Fredrik, Dana, Bob, and Shawn. I did take it further and search for
more info on the XOR function.

"Fredrik Wahlgren" wrote:


"Tom Ogilvy" wrote in message
...
Seriously, if the OP doesn't know how to interpret the nested OR/AND
construct, do you think saying it is an XOR function would shed much light
on it? <g

--
Regards,
Tom Ogilvy


Yes, I do. XOR is something you can search for. I think there are many sites
that provide good explanations as to why or when you should use it. I also
used the term "exclusive or" which I think should help in understanding the
intention of the function. We'll know for sure if Leesa replies.

Best Regards,
Fredrik





Fredrik Wahlgren

function explanation
 

"Leesa" wrote in message
...
Thanks Fredrik, Dana, Bob, and Shawn. I did take it further and search for
more info on the XOR function.

I did a search and found that many of the explanations were highly
technical. However, I think this explanations is good
http://www.webopedia.com/TERM/E/exclusive_OR.html

/Fredrik





All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com