+ Reply to Thread
Results 1 to 4 of 4

IF statement(?)

  1. #1
    Registered User
    Join Date
    05-28-2004
    Posts
    1

    IF statement(?)

    Hi,
    I'm wondering if some kind person might be able to help with a problem I have in putting together the correct "IF" statement. I'll try and be as clear as possible (what I'm actually trying to accmplish is pretty simple - but I can't get the formula right):

    (a) Column A has numbers
    (b) Column B has numbers

    In the calculation column (say, column C will do!) I want it to look at a few conditions, and if met, put a word in that column (say, "fish"!)

    Let's start down the list a little way in cell C6, because it refers back to 5 numbers in column B and 1 number in column C.

    Okay, these are the simple conditions: (remember, we're starting in cell C6)

    (1) If B6 is greater than B5
    (2) And B6 is also greater than A5 (next door)
    (2) And B6 is also less than B4, less than B3, less than B2 and less than B1

    Then put the word "FISH" there.

    I do not want it to put anything if those conditions are not met.

    Does anyone know how to write the correct IF statement to do this?

    (Please note: if it MUST say something when the conditions are not met, I can live with that).

    Thanking you heaps,
    Steve

  2. #2
    B. R.Ramachandran
    Guest

    RE: IF statement(?)

    Hi,

    In C6, enter the formula
    =IF(AND(B6>B5,B6>A5,B6<MIN(B1:B4)),"FISH","")

    Please note that if B6 happens to be equal to one of the numbers in the
    other six cells you are comparing it with, the conditions are NOT met, and
    therefore the formula would return a blank in C6.

    Regards,
    B. R. Ramachandran

    "contrarian" wrote:

    >
    > Hi,
    > I'm wondering if some kind person might be able to help with a problem
    > I have in putting together the correct "IF" statement. I'll try and be
    > as clear as possible (what I'm actually trying to accmplish is pretty
    > simple - but I can't get the formula right):
    >
    > (a) Column A has numbers
    > (b) Column B has numbers
    >
    > In the calculation column (say, column C will do!) I want it to look at
    > a few conditions, and if met, put a word in that column (say, "fish"!)
    >
    > Let's start down the list a little way in cell C6, because it refers
    > back to 5 numbers in column B and 1 number in column C.
    >
    > Okay, these are the simple conditions: (remember, we're starting in
    > cell C6)
    >
    > (1) If B6 is greater than B5
    > (2) And B6 is also greater than A5 (next door)
    > (2) And B6 is also less than B4, less than B3, less than B2 and less
    > than B1
    >
    > Then put the word "FISH" there.
    >
    > I do not want it to put anything if those conditions are not met.
    >
    > Does anyone know how to write the correct IF statement to do this?
    >
    > (Please note: if it MUST say something when the conditions are not met,
    > I can live with that).
    >
    > Thanking you heaps,
    > Steve
    >
    >
    > --
    > contrarian
    > ------------------------------------------------------------------------
    > contrarian's Profile: http://www.excelforum.com/member.php...o&userid=10009
    > View this thread: http://www.excelforum.com/showthread...hreadid=472085
    >
    >


  3. #3
    Forum Contributor
    Join Date
    01-06-2004
    Location
    Carbondale CO
    Posts
    245
    contrarian,

    try in C6

    IF(AND(B6>B5,B6>A5,B6<B4,B6<B3,B6<B2,B6<B1),"fish","")

    HTH
    Casey

  4. #4
    David McRitchie
    Guest

    Re: IF statement(?)

    Hi Steve,

    C6: =IF(AND(B6>A5, B6>B5, B6<B4, B6<B3, B6< B2, B6<B1),"FISH","")

    If the conditions are not met an empty string is inserted in the cell,
    the cell will never test as ISBLANK because it has a formula.
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "contrarian" <[email protected]> wrote ...

    > Okay, these are the simple conditions: (remember, we're starting in
    > cell C6)
    >
    > (1) If B6 is greater than B5
    > (2) And B6 is also greater than A5 (next door)
    > (2) And B6 is also less than B4, less than B3, less than B2 and less
    > than B1
    >
    > Then put the word "FISH" there.
    >
    > I do not want it to put anything if those conditions are not met.
    >
    > Does anyone know how to write the correct IF statement to do this?
    >
    > (Please note: if it MUST say something when the conditions are not met,
    > I can live with that).




+ 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