Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rabiah Begum    on Mar 15 In MS Office Category.

  
Question Answered By: Aamanee Khan   on Mar 15

I'd use a For..Next and a Select statement.

For ilN = 1 to Len(Activecell.value)

Select case mid(Activecell.value,ilN,1)
Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "-"
' Do something.
Case Else
' Do something else.
End Select

Next ilN

I use this sort of thing all the time for stuff... Eg Stipping control
characters out.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on check for digit & hyphen Or get search suggestion and latest updates.


Tagged: