Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 201
Default Checking a cell for only Alphanumerical characters

Is it possible to check that a cell only contains Alphanumerical (a-Z, 0-9)?

--
Trefor
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Checking a cell for only Alphanumerical characters

"Trefor" wrote...
Is it possible to check that a cell only contains Alphanumerical
(a-Z, 0-9)?


Yes. The simplest way involves using a define name, ALPHANUM defined as

={"0";"1";"2";"3";"4";"5";"6";"7";"8";"9";"A";"B"; "C";"D";"E";"F";"G";"H";
"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";"S";"T";"U ";"V";"W";"X";"Y";"Z"}

and use formulas like

=SUMPRODUCT(LEN(x)-LEN(SUBSTITUTE(UPPER(x),ALPHANUM,"")))=LEN(x)


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 201
Default Checking a cell for only Alphanumerical characters

Harlan,

Excellent thanks, did the trick just fine.

--
Trefor


"Harlan Grove" wrote:

"Trefor" wrote...
Is it possible to check that a cell only contains Alphanumerical
(a-Z, 0-9)?


Yes. The simplest way involves using a define name, ALPHANUM defined as

={"0";"1";"2";"3";"4";"5";"6";"7";"8";"9";"A";"B"; "C";"D";"E";"F";"G";"H";
"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";"S";"T";"U ";"V";"W";"X";"Y";"Z"}

and use formulas like

=SUMPRODUCT(LEN(x)-LEN(SUBSTITUTE(UPPER(x),ALPHANUM,"")))=LEN(x)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking a cell has correct formula brownang Excel Discussion (Misc queries) 13 May 27th 07 12:56 AM
How do I sort multiple columns of of numerical and alphanumerical. slowmo New Users to Excel 1 October 18th 06 07:03 PM
if function checking for numerical data vs alpha characters Omar Excel Worksheet Functions 1 May 22nd 06 07:46 PM
Checking cell for Number Lee New Users to Excel 2 October 11th 05 09:23 PM
cell checking Lee New Users to Excel 5 August 25th 05 08:43 PM


All times are GMT +1. The time now is 09:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"