Non A-Z or 0-9 Characters

tmurphy686

Board Regular
Joined
May 10, 2010
Messages
58
I need to create a cell with a "Y" or "N" if a different cell has a non A-Z or 0-9 character in it.

Example:

A B
1-JOHN A SMITH N
2-JOHN A. SMITH Y
3-JOHN $% SMITH Y

I'd prefer to do this without VB - Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi

I assume you also want to allow full stops. For your cell in A6, as an array function (control+shift+enter):

Code:
=IF(SUM(--ISERROR(SEARCH(MID(A6,ROW(INDIRECT("1:"&LEN(A6))),1)[COLOR=#0000ff],"abcdefghijklmnopqrstuvwxyz 0123456789."[/COLOR]))),"N", "Y")

If you need to allow any more characters, simply add them into the blue string.

Hope that helps

Mackers
 
Upvote 0
Or this non-array formula :

=IF(INDEX(FREQUENCY(CODE(MID(A1,ROW($1:$99),1)&"~"),{64,91}),2)=LEN(SUBSTITUTE(A1," ",)),"Y","N")

Regards
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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