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

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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
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/



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
String formula conversion Erik Excel Discussion (Misc queries) 1 February 13th 10 01:09 AM
Conversion of Array Elements to PerCent Confused_in_Houston Excel Discussion (Misc queries) 2 October 2nd 08 03:58 AM
Prevent conversion of numeric text string to scientific notation StuckWithExcelAlas Excel Discussion (Misc queries) 1 December 28th 07 07:02 PM
String to Variant incorrect conversion Paul Excel Worksheet Functions 1 October 4th 07 01:11 AM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"