devuxer
devuxer

Reputation: 42374

How do you set the "global delimiter" in Excel using VBA?

I've noticed that if I use the text-to-columns feature with comma as the delimiter, any comma-delimited data I paste into Excel after that will be automatically split into columns.

This makes me think Excel must have some kind of global delimiter.

If this is true, how would I set this global delimiter using Excel VBA? Is it possible to do this directly, or do I need to "trick" Excel by doing a text-to-columns on some junk data, then delete the data?

My ultimate goal is to be able to paste in a bunch of data from different files using a macro, and have Excel automatically split it into columns according to the delimiter I set.

Upvotes: 0

Views: 4776

Answers (1)

Dick Kusleika
Dick Kusleika

Reputation: 33165

Junk data is the right answer. See here

http://spreadsheetpage.com/index.php/tip/clearing_the_text_to_columns_parameters

Upvotes: 1

Related Questions