array in formula

  • Thread starter Thread starter ecoswiss
  • Start date Start date
E

ecoswiss

I want to do a formula where if say:
value = can be any thing of length 1 for example A, B, C, 2, !
I want to filter that
if value is an alphabet (A-Z) then populate that
else if value is something else then populate with 0

How do i do this in vbscript? is there a function? or do i have to do
multiple if else statments? for all alphabets?

Thanks,
Swiss
 
VBScript is not the same thing as the VBA built into Excel. Assuming you
meant the VBA built into Excel, you can use the Len function to test the
length of a text value and you can use the like operator to test the type of
characters. Since you didn't post more information, here is some generalized
checking code...

If Len(YourTextValue) = 1 Then
If YourTextValue Like "[A-Za-z]" Then
'
' The value in YourTextValue is a single alphabetical
' character, so do whatever you need to with it here
'
End If
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top