Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default code that can distinguish between alpha and numeric characters

Not sure I understand you: are you saying that you need a way to distinguish
those cell values that have numeric characters in spaces 4,5,6 from those
with alpha in those spaces? If so it is not hard at all, and could be done
either in VBA or with a worksheet function:

VBA:
Function CellType(CellTxt as String) As String
If IsNumeric(Mid(CellTxt,4,3)) Then CellType = "Numeric" Else CellType="Char"
End Function

Excel:
=IF(ISERR(VALUE(MID(CellToCheck,4,3))),"ALPHA","NU MERIC")

"Boffita " wrote:

Hi,

I just need some help, i wanted to know if i can use VBA code that can
distinguish between alpha and numeric characters in a cell in excel

For example

We have 2 codes 02-DIS-001-BHIN
and 02-039-001-BHIN

and we need to able to go down a list of items as above and separate
these

Many thanks for your help,

Boffita
:)


---
Message posted from http://www.ExcelForum.com/


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
remove alpha or non-numeric characters from cell mmanis Excel Discussion (Misc queries) 8 August 7th 09 02:39 AM
A validation rule on Alpha and Numeric characters Sar* Excel Worksheet Functions 11 June 11th 07 11:47 PM
Using a cell w/Alpha numeric characters in mulplication formula MAJ0116 Excel Worksheet Functions 4 February 10th 07 01:07 AM
Formulas that include alpha and numeric characters Doktor1 at Mile High Excel Worksheet Functions 2 December 23rd 06 07:36 PM
Can you ID a cell that has both Alpha AND Numeric characters? Phil Excel Worksheet Functions 5 April 18th 06 09:32 PM


All times are GMT +1. The time now is 09:48 AM.

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

About Us

"It's about Microsoft Excel"