+ Reply to Thread
Results 1 to 10 of 10

if and formulas

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    new jersey
    MS-Off Ver
    Excel 1997
    Posts
    13

    if and formulas

    I need an if form that will tell me - if cell j2:m2="Joe" AND o2="Day Shift" say 1.. but if j2:m2 doesn't say "Joe" say 0, AND/OR if o2 doesn't say "Day Shift" say 0.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if and formulas

    is J2:M2 a merged cell?

    Try:

    =--AND(J2="Joe",O2="Day Shift)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    new jersey
    MS-Off Ver
    Excel 1997
    Posts
    13

    Re: if and formulas

    No j2:m2 are all individual cells but Joe can be used in only 1 of the 4 cells. Also if the argument is true in j2:m2 and the argument is also true in o2 i need only a "1"

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if and formulas

    Try:

    =--AND(COUNTIF(J2:M2,"Joe")>0,O2="Day Shift)

    The -- in front will coerce the result of TRUE to 1 and FALSE to 0.

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    new jersey
    MS-Off Ver
    Excel 1997
    Posts
    13

    Re: if and formulas

    no that didn't work and the -- before the 'and' made the formula a statement not a formula, so it didn't even register as an equation. and i cant find anything online that works with is two arguments are true give one answer.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if and formulas

    It should work, I just forgot a double quote to close the "Day Shift"

    =--AND(COUNTIF(J2:M2,"Joe")>0,O2="Day Shift")

    but if you insist...

    an alternative:

    =IF(AND(COUNTIF(J2:M2,"Joe")>0,O2="Day Shift"),1,0)

  7. #7
    Registered User
    Join Date
    10-10-2012
    Location
    new jersey
    MS-Off Ver
    Excel 1997
    Posts
    13

    Re: if and formulas

    the second one worked perfectly. thank you VERY much

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if and formulas

    Maybe you are really using Google Spreadsheet or OpenOffice?

  9. #9
    Registered User
    Join Date
    10-10-2012
    Location
    new jersey
    MS-Off Ver
    Excel 1997
    Posts
    13

    Re: if and formulas

    Nope I am just using an old version of office. I think it is from 97. I know it's not open office and it is def not google spreadsheet I have had this version for free and for many years from a friend.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if and formulas

    hmmm good to know. I didn't think that it wouldn't work in the earlier versions... but hey, you learn something knew every day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1