ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   change "true" and "false" to "availble" and "out of stock" (https://www.excelbanter.com/excel-worksheet-functions/150942-change-true-false-availble-out-stock.html)

inthestands

change "true" and "false" to "availble" and "out of stock"
 
i am using a search formula =(NOT(ISERROR(SEARCH(C$1,A2)))) which returns a
true or false answer. I would like it to return answers of Available instead
of TRUE and out of stock for FALSE. How would I change the formula to do
this?

Thanks in advance,
inthestands

[email protected]

change "true" and "false" to "availble" and "out of stock"
 
"inthestands" wrote:
i am using a search formula =(NOT(ISERROR(SEARCH(C$1,A2))))
which returns a true or false answer. I would like it to return
answers of Available instead of TRUE and out of stock for FALSE.


=if(not(iserror(search(C$1,A2))), "Available", "Out of Stock")

Peo Sjoblom

change "true" and "false" to "availble" and "out of stock"
 
=IF(ISNUMBER(SEARCH(C$1,A2)),"Available","Out of stock")


NOT(ISERROR())

is the same as ISNUMBER()

for the search/find functions

but it is less to write and one less function


--
Regards,

Peo Sjoblom


"inthestands" wrote in message
...
i am using a search formula =(NOT(ISERROR(SEARCH(C$1,A2)))) which returns a
true or false answer. I would like it to return answers of Available
instead
of TRUE and out of stock for FALSE. How would I change the formula to do
this?

Thanks in advance,
inthestands





All times are GMT +1. The time now is 05:10 AM.

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