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

A newbie question: What's a good way to format and process a text string to get it into a row of cells? Is there an excel method that parses strings into cells?

My excel macro gets a string from another application. The string is to be parsed into multiple cells within one row. I control the othe application, so I can build the string however I want. Should I use CSV? XML? Just put vbCrLf between data items?

Right now the string I'm parsing is CSV:

"item1","item2","etc.."

My macro has no idea how many items to expect - I just want it to put them in consecutive cells in the current row.

-jcf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Convert Text String to Cells

highlight the text and click the data menu and choose text to columns,
follow the prompts for your situation.

"John Ford" wrote in message
...
A newbie question: What's a good way to format and process a text string to
get it into a row of cells? Is there an excel method that parses strings
into cells?

My excel macro gets a string from another application. The string is to be
parsed into multiple cells within one row. I control the othe application,
so I can build the string however I want. Should I use CSV? XML? Just put
vbCrLf between data items?

Right now the string I'm parsing is CSV:

"item1","item2","etc.."

My macro has no idea how many items to expect - I just want it to put them
in consecutive cells in the current row.

-jcf


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Convert Text String to Cells

John,

Under the Data menu is an option for Text to Columns.
Manually copy and paste your text into a cell and play with this option.
After you get used to it - record a macro, than modify the recorded macro to
suit your needs.

steve

"John Ford" wrote in message
...
A newbie question: What's a good way to format and process a text string to
get it into a row of cells? Is there an excel method that parses strings
into cells?

My excel macro gets a string from another application. The string is to be
parsed into multiple cells within one row. I control the othe application,
so I can build the string however I want. Should I use CSV? XML? Just put
vbCrLf between data items?

Right now the string I'm parsing is CSV:

"item1","item2","etc.."

My macro has no idea how many items to expect - I just want it to put them
in consecutive cells in the current row.

-jcf


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Convert Text String to Cells

Hello? My macro is a VBA program that gets the string from another application - this isn't a user pointin' and clickin'. ;-)

HOWEVER... your reply lead me to do the old "record a macro and see how it works" techique. Sure enough, there's a myRange.TextToColumns method which it looks like it will do the trick.

Thanks,
-jcf

"Peter Bobrowski" wrote in message ...
| highlight the text and click the data menu and choose text to columns,
| follow the prompts for your situation.
|
| "John Ford" wrote in message
| ...
| A newbie question: What's a good way to format and process a text string to
| get it into a row of cells? Is there an excel method that parses strings
| into cells?
|
| My excel macro gets a string from another application. The string is to be
| parsed into multiple cells within one row. I control the othe application,
| so I can build the string however I want. Should I use CSV? XML? Just put
| vbCrLf between data items?
|
| Right now the string I'm parsing is CSV:
|
| "item1","item2","etc.."
|
| My macro has no idea how many items to expect - I just want it to put them
| in consecutive cells in the current row.
|
| -jcf
|
|
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
Convert times to text string AZSteve Excel Worksheet Functions 2 April 21st 10 03:19 AM
Convert text string to IP address Mike Excel Worksheet Functions 3 September 22nd 09 03:02 AM
cannot convert text string into value Andy Excel Worksheet Functions 16 September 5th 08 04:52 AM
Convert numbers to text string GARY Excel Discussion (Misc queries) 3 May 22nd 08 05:05 AM
Need to convert text string to seperate cells Debbie Nuding Excel Worksheet Functions 2 December 6th 04 06:14 PM


All times are GMT +1. The time now is 02:30 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"