+ Reply to Thread
Results 1 to 6 of 6

logical test for each and every cell in range

  1. #1
    matt
    Guest

    logical test for each and every cell in range

    i need to check to see if a given range of cells each fall within a range.
    Say I had a column of data like this:

    2
    3
    6
    3
    4

    I want a statement that checks to see if each cell is greater than or equal
    to 1, say. Is there a way I can do this without writing a separate IF
    statement for each cell and another IF statement for those results?


  2. #2
    Earl Kiosterud
    Guest

    Re: logical test for each and every cell in range

    Matt,

    What does "if each cell is greater" mean? Do you want a count of the cells?
    Do you want to know if any meet the criteria (Yes/No)?

    --
    Earl Kiosterud
    www.smokeylake.com

    "matt" <[email protected]> wrote in message
    news:[email protected]...
    >i need to check to see if a given range of cells each fall within a range.
    > Say I had a column of data like this:
    >
    > 2
    > 3
    > 6
    > 3
    > 4
    >
    > I want a statement that checks to see if each cell is greater than or
    > equal
    > to 1, say. Is there a way I can do this without writing a separate IF
    > statement for each cell and another IF statement for those results?
    >




  3. #3
    matt
    Guest

    RE: logical test for each and every cell in range

    I need to know that all cells individually meet the criteria. So in this
    case, 2 is greater than 1, so is 3, so is 6, etc, and so in this case all
    cells are greater than 1. I want to know if i can write something like

    IF(A1:A8>=1,"TRUE","false")

    I know this format doesn't work, but I think you see what I'm getting at.



    "matt" wrote:

    > i need to check to see if a given range of cells each fall within a range.
    > Say I had a column of data like this:
    >
    > 2
    > 3
    > 6
    > 3
    > 4
    >
    > I want a statement that checks to see if each cell is greater than or equal
    > to 1, say. Is there a way I can do this without writing a separate IF
    > statement for each cell and another IF statement for those results?
    >


  4. #4
    Rowan
    Guest

    Re: logical test for each and every cell in range

    Actually =IF(A1:A8>1,"True","False") will work if you enter it as an
    array formula i.e commit it with Ctrl+Shift+Enter.

    Otherwise you could use something like:
    =IF(COUNTIF(A1:A8,"<2")=0,"True","False")

    Regards
    Rowan

    matt wrote:
    > I need to know that all cells individually meet the criteria. So in this
    > case, 2 is greater than 1, so is 3, so is 6, etc, and so in this case all
    > cells are greater than 1. I want to know if i can write something like
    >
    > IF(A1:A8>=1,"TRUE","false")
    >
    > I know this format doesn't work, but I think you see what I'm getting at.
    >
    >
    >
    > "matt" wrote:
    >
    >
    >>i need to check to see if a given range of cells each fall within a range.
    >>Say I had a column of data like this:
    >>
    >>2
    >>3
    >>6
    >>3
    >>4
    >>
    >>I want a statement that checks to see if each cell is greater than or equal
    >>to 1, say. Is there a way I can do this without writing a separate IF
    >>statement for each cell and another IF statement for those results?
    >>


  5. #5
    matt
    Guest

    Re: logical test for each and every cell in range

    thanks for the help!

    "Rowan" wrote:

    > Actually =IF(A1:A8>1,"True","False") will work if you enter it as an
    > array formula i.e commit it with Ctrl+Shift+Enter.
    >
    > Otherwise you could use something like:
    > =IF(COUNTIF(A1:A8,"<2")=0,"True","False")
    >
    > Regards
    > Rowan
    >
    > matt wrote:
    > > I need to know that all cells individually meet the criteria. So in this
    > > case, 2 is greater than 1, so is 3, so is 6, etc, and so in this case all
    > > cells are greater than 1. I want to know if i can write something like
    > >
    > > IF(A1:A8>=1,"TRUE","false")
    > >
    > > I know this format doesn't work, but I think you see what I'm getting at.
    > >
    > >
    > >
    > > "matt" wrote:
    > >
    > >
    > >>i need to check to see if a given range of cells each fall within a range.
    > >>Say I had a column of data like this:
    > >>
    > >>2
    > >>3
    > >>6
    > >>3
    > >>4
    > >>
    > >>I want a statement that checks to see if each cell is greater than or equal
    > >>to 1, say. Is there a way I can do this without writing a separate IF
    > >>statement for each cell and another IF statement for those results?
    > >>

    >


  6. #6
    Dave Peterson
    Guest

    Re: logical test for each and every cell in range

    Wouldn't you need something like:
    =IF(AND(A1:A8>1),"True","False")
    (still array entered)

    or even
    =AND(A1:A8>1)
    (still array entered, but returns real booleans, not text.)

    Rowan wrote:
    >
    > Actually =IF(A1:A8>1,"True","False") will work if you enter it as an
    > array formula i.e commit it with Ctrl+Shift+Enter.
    >
    > Otherwise you could use something like:
    > =IF(COUNTIF(A1:A8,"<2")=0,"True","False")
    >
    > Regards
    > Rowan
    >
    > matt wrote:
    > > I need to know that all cells individually meet the criteria. So in this
    > > case, 2 is greater than 1, so is 3, so is 6, etc, and so in this case all
    > > cells are greater than 1. I want to know if i can write something like
    > >
    > > IF(A1:A8>=1,"TRUE","false")
    > >
    > > I know this format doesn't work, but I think you see what I'm getting at.
    > >
    > >
    > >
    > > "matt" wrote:
    > >
    > >
    > >>i need to check to see if a given range of cells each fall within a range.
    > >>Say I had a column of data like this:
    > >>
    > >>2
    > >>3
    > >>6
    > >>3
    > >>4
    > >>
    > >>I want a statement that checks to see if each cell is greater than or equal
    > >>to 1, say. Is there a way I can do this without writing a separate IF
    > >>statement for each cell and another IF statement for those results?
    > >>


    --

    Dave Peterson

+ 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