ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Cell Contains specific UPPERCASE text (https://www.excelbanter.com/excel-worksheet-functions/231434-if-cell-contains-specific-uppercase-text.html)

GoBucks[_2_]

If Cell Contains specific UPPERCASE text
 
I'm trying to write a fomula that will look in column A for any text that
contains the text "LOA". If TRUE, I want to apply some conditional formatting
to a range of cells. I tried the following formula when A4 = "loa" and it
still comes up TRUE. Any suggestions?

=ISNUMBER(SEARCH(UPPER("LOA"),A4))

AG[_3_]

If Cell Contains specific UPPERCASE text
 
Try this:

=ISNUMBER(FIND("LOA",UPPER(A4),1))

- AG

Glenn

If Cell Contains specific UPPERCASE text
 
GoBucks wrote:
I'm trying to write a fomula that will look in column A for any text that
contains the text "LOA". If TRUE, I want to apply some conditional formatting
to a range of cells. I tried the following formula when A4 = "loa" and it
still comes up TRUE. Any suggestions?

=ISNUMBER(SEARCH(UPPER("LOA"),A4))



SEARCH is not case sensitive. FIND is:

=ISNUMBER(FIND("LOA",A4))

AG[_3_]

If Cell Contains specific UPPERCASE text
 
Hi GoBucks,

Because FIND is case sensitive, that is precisely why I have used:

=ISNUMBER(FIND("LOA",UPPER(A4),1))

It does not matter whether A4 contains loa or Loa of loA or lOa ...
upper of that will always make is "LOA", which is why you will be able
to find "LOA" in UPPER(A4). As long as loa exists in cell A4 in some
form the FIND("LOA",UPPER(A4),1) will always return a number.


GoBucks[_2_]

If Cell Contains specific UPPERCASE text
 
Thank you both! worked great.

"Glenn" wrote:

GoBucks wrote:
I'm trying to write a fomula that will look in column A for any text that
contains the text "LOA". If TRUE, I want to apply some conditional formatting
to a range of cells. I tried the following formula when A4 = "loa" and it
still comes up TRUE. Any suggestions?

=ISNUMBER(SEARCH(UPPER("LOA"),A4))



SEARCH is not case sensitive. FIND is:

=ISNUMBER(FIND("LOA",A4))



All times are GMT +1. The time now is 02:40 PM.

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