Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

characters to excel 2

Status
Not open for further replies.

ram567

Programmer
Dec 28, 2007
123
US
i have Sess0.Screen.GetString(9, 3, 100))
for example xxxyz, xxxyz1234,xxxx7352,yyyME,YYYMEZ10 .....
HOW DO I SEPARATE IN EXCEL SHEET TWO DIFFERENT COLUMN
COLUMN A XXXYZ
COLUMN B XXXYZ1234
 



How are your MS Access tables and Text files related to the data you are scraping from Extra?

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
No ! vb6 form database msacces
extra only in text file and excel nothing else
extract from extra! excel file and text file only not antyhignelse.
and sometime macro will change the extra data's
 
Code:
Declare Sub Split(ByRef arr() as Variant, target as String, search as String)
Declare Sub Print_Array(arr() as Variant)

Sub Main()
   Dim arr() As Variant

   Call Split(arr, "xxxyz, xxxyz1234,xxxx7352,yyyME,YYYMEZ10", ",")
   Call Print_Array(arr)
   MsgBox "Done"

   Call Split(arr, "a@b@c@d@e", "@")
   Call Print_Array(arr)
   MsgBox "Done"
End Sub

Private Sub Split(ByRef arr() As Variant, target As String, search As String)
   Dim i As Integer, j As Integer

   i = InStr(1, target, search)
   j = 1

   Do While i > 0
      ReDim Preserve arr(j)
      arr(j) = Trim(Mid(target, 1, i - 1))
      target = Mid(target, i + 1)
      i      = InStr(1, target, search)
      j      = j + 1
   Loop

   ReDim Preserve arr(j)
   arr(j) = target
End Sub

Private Sub Print_Array(arr() As Variant)
   Dim i As Integer

   For i = 1 To UBound(arr)
      MsgBox arr(i)
   Next
End Sub
 
Thank you very much winblow
the below code has not only the xxxyz,,, and sonon
get string (9,13,100) + (10,13,100)
so each page has that particular row 9 & 10 200 words
it has to split the , in extra! and if it is <5characters put it column c else column d
that means before , <5 in column c
rest column d
split function alrady Skip has given the code, it is not working in extra! i dont know how i put it in vba

Sub Main()
Dim arr() As Variant

Call Split(arr, "xxxyz, xxxyz1234,xxxx7352,yyyME,YYYMEZ10", ",")
Call Print_Array(arr)
MsgBox "Done"

Call Split(arr, "a@b@c@d@e", "@")
Call Print_Array(arr)
MsgBox "Done"
End Sub
 



Ram,

Where is your head?

"split function alrady Skip has given the code, it is not working in extra! i dont know how i put it in vba"

Did you not notice that WinblowsME posted a Sub for Split and an example of how to use it???

Ram, you need to do your work and stop waisting time asking questions that have already been answered. We all are ready to try to help, but YOU HAVE TO DO YOUR PART and get into the game!!! Your lack of focus and clarity, are making me more and more frustrated with your posts, and I gravely doubt your ability to carry the ball as you should. These kinds of reponses from you, lead me to more firmly believe that you are in WAY over your head, and this project is FAR beyond your current abilities. You are not ready fot this level of play!


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
skip adn winblow
Thank you very much for your cde. i fixed it, it workes very well, i put it in everything in extra! and it workes fine. thank you very much for your all help
 


Ram,

Please post back when you need help. You are welcome.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
skip
thank you very much for your help . waht you said is correct. i learnt lot of the things from you
once agian thank yu very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top