ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Search vs find vs countif (https://www.excelbanter.com/excel-discussion-misc-queries/230234-search-vs-find-vs-countif.html)

Darby

Search vs find vs countif
 
I am trying to find a text string within a text field column in a large
spreadsheet.

I've discovered that =COUNTIF(A1,"*abc*") does not work if the starting
position of the text is 300

=SEARCH("abc",A1) and =FIND("abc",A1) both seem to work fine.

The spreadsheet is big and slow so I'd like to pick the most efficient
choice, but am also wondering what the difference between the 2 options are.

Thanks


Dave Peterson

Search vs find vs countif
 
I'm not sure I'd want the most efficient in this case. I'd want the one that
would work.

So if you're searching a cell with that has more than 255 characters for a
string that only occurs after that 255th character, you'd have to use =find() or
=search() to get accurate results.



Darby wrote:

I am trying to find a text string within a text field column in a large
spreadsheet.

I've discovered that =COUNTIF(A1,"*abc*") does not work if the starting
position of the text is 300

=SEARCH("abc",A1) and =FIND("abc",A1) both seem to work fine.

The spreadsheet is big and slow so I'd like to pick the most efficient
choice, but am also wondering what the difference between the 2 options are.

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 02:29 AM.

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