ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Insert text in Cell A1 based on keyword criteria (https://www.excelbanter.com/charts-charting-excel/93782-insert-text-cell-a1-based-keyword-criteria.html)

[email protected]

Insert text in Cell A1 based on keyword criteria
 
I want to populate cell A1 with specific text (the word "Active")
whenever the word "Yes" is found in cells A2:A20. Whenever the word
"Yes" is not found in cells A2:A20 I want to leave cell A1 blank.


David Biddulph

Insert text in Cell A1 based on keyword criteria
 
wrote in message
oups.com...
I want to populate cell A1 with specific text (the word "Active")
whenever the word "Yes" is found in cells A2:A20. Whenever the word
"Yes" is not found in cells A2:A20 I want to leave cell A1 blank.


=IF(COUNTIF(A2:A20,"Yes")0,"Active","")
--
David Biddulph




All times are GMT +1. The time now is 12:55 PM.

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