Probably the easiest way would be to open the csv file directly using
VBA's I/O routines, put the data in one large string, then use Split
to break the data apart by some delimiter (a comma), and finally
picking elements out of the array in the desired order and writing
those values out to the worksheet.
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Mon, 15 Dec 2008 06:57:20 -0800 (PST), Robert H
wrote:
I use data that is export from electrical test equipment in CSV
format. For years I have been developing vba code to manipulate this
data for analysis. One problem with the data is that it is grouped in
columns in a way that makes analysis and charting cumbersome. I
should have worked this out long ago but must have enjoyed the
struggle.
the data come in in columns like:
TYPE, DATE, DC_RES, IMP_100_Hz, PHASE_100_Hz, LC_100_Hz, QD_100_Hz,
IMP_200_Hz, PHASE_200_Hz, LC_200_Hz, QD_200_Hz, IMP_400_Hz,
PHASE_400_Hz, LC_400_Hz, QD_400_Hz, IMP_1_kHz, PHASE_1_kHz, LC_1_kHz,
QD_1_kHz
The data runs higher in frequency
I need to reorganize the data so that each data type is grouped
together. For instance TYPE, DATE, DC_RES, IMP_100_Hz, IMP_200_Hz,
IMP_400_Hz, IMP_1_kHz, etc
a push towards efficient way to do this would be helpful.
thanks
Robert