autoparsing not working

F

fredh

sometimes when i paste data to a new sheet it is not autoparsed into
columns - everything goes into one column. What causes this please?
 
H

Harlan Grove

fredh said:
sometimes when i paste data to a new sheet it is not autoparsed into
columns - everything goes into one column. What causes this please?

The current Data > Text to Columns > Delimited settings determine how pasted
text data is parsed. By default, only tabs (ASCII 9 decimal character code)
are treated as field separators. If you've already run Data > Text to
Columns > Delimited and included Spaces as field separators, then
subsequently pasted text data will be split into fields at space characters.
If not, no splitting may occur.

If you always want this parsing functionality, add the following to the
Workbook_Open event handler in your Personal.xls file.


Dim f As String, s As Variant

s = Application.Calculation
Application.Calculation = xlCalculationManual

f = ActiveCell.Formula
ActiveCell.Formula = "x"
Selection.TextToColumns Destination:=ActiveCell, DataType:=xlDelimited,
_
ConsecutiveDelimiter:=True, Tab:=True, Space:=True
ActiveCell.Formula = f

Application.Calculation = s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top