View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
A.W.J. Ales A.W.J. Ales is offline
external usenet poster
 
Posts: 63
Default String to Array Conversion

Ussiddiqui ,

Would this suffice ?

Function Str2Arr(AString As String)
Dim NRchrs As Integer, I As Integer
Dim StrArr()
NRchrs = Len(AString)
ReDim StrArr(1 To NRchrs)
For I = 1 To NRchrs
StrArr(I) = Mid(AString, I, 1)
Next
Str2Arr = StrArr
End Function

Put in a cell , say A1 the string abcd
In cell B1:E1 put the formula =Str2Arr(A1) and array enter it ( that is
select the four cells, type the formula and then press Cntr + Shift + Enter.
The formula will then be surrounded (in all four cells) with { } (You
should NOT self type these {} ).

a b c and d will be the value in the four cells.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *

"Ussiddiqui " wrote in message
...
Do any body know that how to convert a String To an Array .... Through
VB , Kindly tell me the function .............. Please Be quick. please
.. :-)


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