Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default array in formula

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default array in formula

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

--
Rick (MVP - Excel)


wrote in message
...
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


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
Array formula SUMIF with 2D sum_range array Rich_84 Excel Worksheet Functions 3 April 3rd 09 10:46 PM
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Find specific value in array of array formula DzednConfsd Excel Worksheet Functions 2 January 13th 09 06:19 AM
copy one array formula to an array range guedj54 Excel Programming 2 October 29th 06 07:38 PM
Tricky array formula issue - Using array formula on one cell, then autofilling down a range aspenbordr Excel Programming 0 July 27th 05 03:59 PM


All times are GMT +1. The time now is 03:06 PM.

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"