String to Array Conversion

  • Thread starter Thread starter Ussiddiqui
  • Start date Start date
U

Ussiddiqui

Do any body know that how to convert a String To an Array .... Through
VB , Kindly tell me the function .............. Please Be quick. please
... :-)
 
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 *
 
Back
Top