PDA

View Full Version : Excel 'Text to Columns' question


Oxeagle
2nd Nov 2006, 10:42
Hi guys,
I'm currently building a macro to update a spreadsheet with data from another spreadsheet whenever it is opened by the user. This in itself is not a problem, but part of what I would like the macro to do is to automatically break down coordinates in the format 'N51 50.22' from one cell and split it over 4 cells in the format 'N 51 50 22'. So far, I havn't been able find a forumla to do this automatically, the only way i've found is to select the 'Text to Columns' function from the 'Data' menu in Excel. Does anyone have any idea how I can do this automatically?
Thanks,

Ox

Saab Dastard
2nd Nov 2006, 11:04
You can do this with the TEXT string functions in Excel - Left, Right, Len, Clean etc.

SD

Oxeagle
2nd Nov 2006, 15:00
Perfect :ok: That set me off in the right direction, looked up the text manipulation formulae that you mentioned and voila! It works flawlessly now.

Many thanks for your help SD :ok: