ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   =IF formula #NAME? error (https://www.excelbanter.com/excel-worksheet-functions/120904-re-%3Dif-formula-name-error.html)

Max

=IF formula #NAME? error
 
Perhaps you mean in say, B1:
=IF(ISNUMBER(SEARCH("test",A1)),"Y","N")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Access101" wrote:

All three of these are wrong, I can't think of a fourth:

=If(instr(A1, "test"), "Y", "N")
=If(instr(A1, "test")=-1, "Y", "N")
=If(instr(A1, "test")=True, "Y", "N")

Cell A1 contains: This is a test


Access101

=IF formula #NAME? error
 
That works just great, thank you Max. Happy Holidays!

"Max" wrote:

Perhaps you mean in say, B1:
=IF(ISNUMBER(SEARCH("test",A1)),"Y","N")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Access101" wrote:

All three of these are wrong, I can't think of a fourth:

=If(instr(A1, "test"), "Y", "N")
=If(instr(A1, "test")=-1, "Y", "N")
=If(instr(A1, "test")=True, "Y", "N")

Cell A1 contains: This is a test


Access101

=IF formula #NAME? error
 
It works great, however, I don't understand why it wouldn't be this instead
(which by the way does NOT work)

=IF(ISTEXT(SEARCH("test",A1)),"Y","N")


"Max" wrote:

Perhaps you mean in say, B1:
=IF(ISNUMBER(SEARCH("test",A1)),"Y","N")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Access101" wrote:

All three of these are wrong, I can't think of a fourth:

=If(instr(A1, "test"), "Y", "N")
=If(instr(A1, "test")=-1, "Y", "N")
=If(instr(A1, "test")=True, "Y", "N")

Cell A1 contains: This is a test


Access101

=IF formula #NAME? error
 
Never mind, I see my folly.

Search returns a number, and IsNumber returns the true

"Max" wrote:

Perhaps you mean in say, B1:
=IF(ISNUMBER(SEARCH("test",A1)),"Y","N")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Access101" wrote:

All three of these are wrong, I can't think of a fourth:

=If(instr(A1, "test"), "Y", "N")
=If(instr(A1, "test")=-1, "Y", "N")
=If(instr(A1, "test")=True, "Y", "N")

Cell A1 contains: This is a test



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

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