![]() |
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? |
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? |
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? |
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? |
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? |
All times are GMT +1. The time now is 08:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com