#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jrt jrt is offline
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 353
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default 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



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 statements Tredown Excel Worksheet Functions 2 June 6th 07 12:51 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
If Statements: Miguel Zapico Excel Discussion (Misc queries) 2 April 26th 06 09:48 PM
IF and MAX statements bob Excel Worksheet Functions 5 April 2nd 06 04:33 AM
More than 7 IF(AND) statements alexm999 Excel Discussion (Misc queries) 3 August 12th 05 12:00 PM


All times are GMT +1. The time now is 01:13 AM.

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"