+ Reply to Thread
Results 1 to 7 of 7

if then else formual q

  1. #1
    Registered User
    Join Date
    02-03-2011
    Location
    Auburn Hills, MI
    MS-Off Ver
    Excel 2007
    Posts
    4

    if then else formual q

    have a range of numbers in columns i through p. I have the usl in column g and the lsl in column h. i want to evaluate the range of numbers to see if they are greater than the spec. or less than the spec. if they are i want the word 'fail' to appear; otherwise, I want the word 'pass' to appear.

    Can you help me with this formula

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: if then else formual q

    What are "usl", "lsl", and "spec"? Which columns are they in and what do you want to compare with what?


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-03-2011
    Location
    Auburn Hills, MI
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: if then else formual q

    usl and lsl are upper spec limit and lower spec limit. ...i want to see if the range of numbers in columns i thru p are within spec

  4. #4
    Registered User
    Join Date
    02-03-2011
    Location
    Auburn Hills, MI
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: if then else formual q

    =IF(OR((I2:P2)<H2),((I2:P2)>G2)),$S$1,$R$1 this is the formula i used. columns i thru p are the raw data. column g = usl and h = lsl. column s1 = fail and column r 1 = pass. I get an error message.

  5. #5
    Registered User
    Join Date
    07-19-2010
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: if then else formual q

    So you have values in columns i through p. Do you want to evaluate whole rows or each cell in i through p individually? Where will "Pass" or "Fail" appear?

  6. #6
    Registered User
    Join Date
    07-19-2010
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: if then else formual q

    Try this:

    =IF(OR(H2>(I2:P2),G2<(I2:P2)),$S$1,$R$1)

    This is an array formula that must be committed using Ctrl+Shift+Enter.

    So copy the above formula into the formula bar, and then press:
    Ctrl+Shift+Enter

    HTH,
    Paul

  7. #7
    Registered User
    Join Date
    02-03-2011
    Location
    Auburn Hills, MI
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: if then else formual q

    thanks pclive! it works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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