Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
matt
 
Posts: n/a
Default 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   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
matt
 
Posts: n/a
Default

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   Report Post  
Rowan
 
Posts: n/a
Default

Actually =IF(A1:A81,"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   Report Post  
matt
 
Posts: n/a
Default

thanks for the help!

"Rowan" wrote:

Actually =IF(A1:A81,"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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"