FIND does not find text

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
FIND is driving me crazy!!! I have a calculation in a column =FIND("~~",[Note Text]) which should return that it found the text.

However, I get #ERROR: Calculation error in column 'Patient Notes Body'[]: The search Text provided to function 'FIND' could not be found in the given text.

I confirmed the field being examined (Note Text) is text by using ISTEXT function.

I tried using different text to FIND that I know is in Note Text and continue to get the error.

Is the FIND function very fussy and moody?

Thanks,

G/L
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I really suspect you just have SOME rows that don't match ~~. Wrap it in IFERROR

=IFERROR(FIND("~~",[Note Text]), -1)
 
Upvote 0
I am confident all rows have the text to be found (~~). Even if some rows might not, why would every row return an Error? I think the problem is something more than can be solved by IFERROR but will try it anyways.

Thanks for the tip.
 
Upvote 0
Hello.

Well, when I was trying to build the following sintax I got the same problem with the FIND command:

=SUBSTITUTE([Despesa_];[Despesa_];TRIM(MID([Despesa_];(IFERROR(SEARCH("-";[Despesa_]);0)+1);LEN([Despesa_])-IFERROR(SEARCH("-";[Despesa_]);0))))

Then I changed to the SEARCH and the error was still there.

However, in Microsoft's page for the SEARCH function there is the explanation:

(SEARCH Function)
[h=3]Description[/h]The formula in the preceding example will fail if the search string is not found in every row of the source column. Therefore, the next example demonstrates how to use IFERROR with the SEARCH function, to ensure that a valid result is returned for every row.
The following formula finds the position of the character "-" within the column, and returns -1 if the string is not found.

[h=3]Code[/h]



= IFERROR(SEARCH("-",[PostalCode]),-1)</pre>




[h=3]Comments[/h]Note that the data type of the value that you use as an error output must match the data type of the non-error output type. In this case, you provide a numeric value to be output in case of an error because SEARCH returns an integer value.
However, you could also return a blank (empty string) by using BLANK() as the second argument to IFERROR.


So, we are obliged to use the IFERROR if any of the cells does not match the SEARCH function.

IFERROR(SEARCH("~~";[field you are searching]);-1)
 
Upvote 0

Forum statistics

Threads
1,224,041
Messages
6,176,041
Members
452,698
Latest member
MikaVmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top