ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if statements (https://www.excelbanter.com/excel-worksheet-functions/168797-if-statements.html)

jrt

if statements
 
Please help..
I'm trying to create a formula in a field that will add a 1 for a true
response and a 0 for a false but i can't figure out how to combine multiple
if statements...here's what I'm trying to do...

If the datefield is null and valueX=1 or valueX=2 or valueX=3 then it is
true (1) else false (0)

I can't seem to figure out how to add in the multiple or statements.

thank you

Gary''s Student

if statements
 
Not sure what the datafield is but if A1 contains a number and you want
1,2,or 3 to yield True then:

=IF(OR(A1=1,A1=2,A1=3),1,0)

--
Gary''s Student - gsnu200760


"jrt" wrote:

Please help..
I'm trying to create a formula in a field that will add a 1 for a true
response and a 0 for a false but i can't figure out how to combine multiple
if statements...here's what I'm trying to do...

If the datefield is null and valueX=1 or valueX=2 or valueX=3 then it is
true (1) else false (0)

I can't seem to figure out how to add in the multiple or statements.

thank you


BoniM

if statements
 
If I understand correctly...

=IF(AND(A2="", OR(B2=1, B2=2, B2=3)), 1, 0)

if A2 is your date field and B2 is your "X" field, this will enter one in
the field if there is no date in A2 and B2 contains 1, 2, or 3. It will
enter 0 in the field if either contains anything else.
Hope it helps...

"jrt" wrote:

Please help..
I'm trying to create a formula in a field that will add a 1 for a true
response and a 0 for a false but i can't figure out how to combine multiple
if statements...here's what I'm trying to do...

If the datefield is null and valueX=1 or valueX=2 or valueX=3 then it is
true (1) else false (0)

I can't seem to figure out how to add in the multiple or statements.

thank you


RagDyeR

if statements
 
If datefield is A1, and X is A2, try this:

=(A1="")*OR(A2={1,2,3})
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"jrt" wrote in message
...
Please help..
I'm trying to create a formula in a field that will add a 1 for a true
response and a 0 for a false but i can't figure out how to combine
multiple
if statements...here's what I'm trying to do...

If the datefield is null and valueX=1 or valueX=2 or valueX=3 then it is
true (1) else false (0)

I can't seem to figure out how to add in the multiple or statements.

thank you





All times are GMT +1. The time now is 08:04 AM.

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