If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with OR statement
Hi. Currently I have the following Excel formula, which returns 2 if the
statement is TRUE and returns 0 if the statement is FALSE. =if(Or(O4=1,(And(O4=7,O37))),2,0) Is it possible to format this statement to return a 1 if the OR statement is TRUE, but return a 2 if the AND statement is TRUE? Thanks! |
#2
|
|||
|
|||
=if(O4=1,1,IF(And(O4=7,O37))),2,0))
perhaps? -- HTH RP (remove nothere from the email address if mailing direct) "MrMike" wrote in message news Hi. Currently I have the following Excel formula, which returns 2 if the statement is TRUE and returns 0 if the statement is FALSE. =if(Or(O4=1,(And(O4=7,O37))),2,0) Is it possible to format this statement to return a 1 if the OR statement is TRUE, but return a 2 if the AND statement is TRUE? Thanks! |
#3
|
|||
|
|||
try
=1*(O4=1)+2*And(O4=7,O37) or Bob's, with a slight change =IF(O4=1,1,IF(AND(O4=7,O37),2,0)) "MrMike" wrote: Hi. Currently I have the following Excel formula, which returns 2 if the statement is TRUE and returns 0 if the statement is FALSE. =if(Or(O4=1,(And(O4=7,O37))),2,0) Is it possible to format this statement to return a 1 if the OR statement is TRUE, but return a 2 if the AND statement is TRUE? Thanks! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SQL Statement created from ItemsSelected from Several Listboxes.. | Denis Bisson | Using Forms | 2 | February 21st, 2005 02:48 AM |
Stop Statement Doesn't Stop | drwip | General Discussion | 1 | December 2nd, 2004 11:10 PM |
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements | Mark V | Mailmerge | 8 | November 30th, 2004 01:31 PM |
using the results of a SQL SELECT(COUNT) statement in VBA | Paul James | Using Forms | 7 | September 24th, 2004 09:44 PM |
Access 2000 query SQL statement into VBA code | Clint | Running & Setting Up Queries | 1 | June 10th, 2004 01:33 PM |