ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple cells for IF function (https://www.excelbanter.com/excel-worksheet-functions/240554-multiple-cells-if-function.html)

Frustrated

Multiple cells for IF function
 
I'm trying to figure a way to determine if a word appears in a range of cells
to return a certain value. For instance. If the word "Holiday" appears in
blocks A1 through A200, then in cell B2 it would return a value of "taken" if
it doesn't appear in that range then return a value of "Need to take" how
can this be done. I have been able to use the IF function to return the
desired outcome for only one of the cells, but when I attemp to use a range
of cells it will not work. Please help.

Jacob Skaria

Multiple cells for IF function
 
Use COUNTIF()

If holiday is a cell value
=IF(COUNTIF(A1:A100,"Holiday"),"Taken","Need to take")

If holiday is within the cell
=IF(COUNTIF(A1:A100,"*Holiday*"),"Taken","Need to take")


If this post helps click Yes
---------------
Jacob Skaria


"Frustrated" wrote:

I'm trying to figure a way to determine if a word appears in a range of cells
to return a certain value. For instance. If the word "Holiday" appears in
blocks A1 through A200, then in cell B2 it would return a value of "taken" if
it doesn't appear in that range then return a value of "Need to take" how
can this be done. I have been able to use the IF function to return the
desired outcome for only one of the cells, but when I attemp to use a range
of cells it will not work. Please help.


Frustrated

Multiple cells for IF function
 
Thank you so much. Is there a way I can change the cell color for the
different results?

"Jacob Skaria" wrote:

Use COUNTIF()

If holiday is a cell value
=IF(COUNTIF(A1:A100,"Holiday"),"Taken","Need to take")

If holiday is within the cell
=IF(COUNTIF(A1:A100,"*Holiday*"),"Taken","Need to take")


If this post helps click Yes
---------------
Jacob Skaria


"Frustrated" wrote:

I'm trying to figure a way to determine if a word appears in a range of cells
to return a certain value. For instance. If the word "Holiday" appears in
blocks A1 through A200, then in cell B2 it would return a value of "taken" if
it doesn't appear in that range then return a value of "Need to take" how
can this be done. I have been able to use the IF function to return the
desired outcome for only one of the cells, but when I attemp to use a range
of cells it will not work. Please help.


Frustrated

Multiple cells for IF function
 
Nevermind, I was able to figure it out. Thank anyway.

"Frustrated" wrote:

Thank you so much. Is there a way I can change the cell color for the
different results?

"Jacob Skaria" wrote:

Use COUNTIF()

If holiday is a cell value
=IF(COUNTIF(A1:A100,"Holiday"),"Taken","Need to take")

If holiday is within the cell
=IF(COUNTIF(A1:A100,"*Holiday*"),"Taken","Need to take")


If this post helps click Yes
---------------
Jacob Skaria


"Frustrated" wrote:

I'm trying to figure a way to determine if a word appears in a range of cells
to return a certain value. For instance. If the word "Holiday" appears in
blocks A1 through A200, then in cell B2 it would return a value of "taken" if
it doesn't appear in that range then return a value of "Need to take" how
can this be done. I have been able to use the IF function to return the
desired outcome for only one of the cells, but when I attemp to use a range
of cells it will not work. Please help.



All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com