Separation of data

5 pts.
Tags:
VBA
I want to copy a part of a table from Adobe to Excel, but all the data are getting copied to one cell. How can I use VBA to separate this set of data each one into different cell? Thank you beforehand.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello Lyu,
this depends on how your data is formatted/written.
Example, if you know that there’s a separator character you may use the Split function
<pre>
MYDATA = Split(DATA,”mychar”)
cell1= MyData(0)
cell2= MyData(1)
</pre>
…and so on.

If instead you know that it is a matter of data length you may use:
<pre>
MyCell1 = Left(MyData,6)
MyCell2 = Mid(MyData,6,4)
MyCell3 = Right(MyData,2)
</pre>

…and so on.

It may be better if you post your kind of data so I, or another peer, can show you an example.
Bye

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following