ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formulas dealing with searching for characters (https://www.excelbanter.com/excel-worksheet-functions/72238-formulas-dealing-searching-characters.html)

Electro7

Formulas dealing with searching for characters
 
Hi,
I have a list of file names including the complete path, and I'm trying
to see if the list has special characters like %, &, @ etc. I am using
the find function now but I have to have a new function to check all
the characters. Is there a way to have just one formula to check to
see a list like

C:\WINDOWS\IE4 Error Log.txt
C:\WINDOWS\KB832854.log

etc has any of the characters I'm searching for?


Thanks for your help.


daddylonglegs

Formulas dealing with searching for characters
 

If you just want a TRUE/FALSE answer try

=COUNT(FIND({"%","&","@"},A1))0


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=513416


Pete_UK

Formulas dealing with searching for characters
 
The SUBSTITUTE( ) function allows you to change some text to different
text, and so could be used, for example, to change "*" to "". A
composite function could thus be built up of
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( etc ))), but you are limited in this
to the nesting level of 7 so you could not eradicate all the illegal
characters in one formula.

A UDF could do it quite easily.

Hope this helps.

Pete


Electro7

Formulas dealing with searching for characters
 
daddylonglegs,
Thanks!
you showed me how to include multiple items using find. Got my search
to work correctly now.

Electro7



All times are GMT +1. The time now is 06:37 PM.

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