PDA

View Full Version : Split The Column Data based on first column values using VBA



sasi
07-21-2010, 09:36 PM
Dear All ,

I have been searching for a VBA code on the internet to split Data based on first column vlaues and fill it in different Column ranges.split suppose to happen while importing the delimited(!) text file.
Text file has the following column.
A!REFDES!PIN_NUMBER!NET_NAME!NET_ETCH_LENGTH!

I am leaving out A column and importing Rest of the column into excel sheet.

Assume my Text file have this data,
REFDES!PIN_NUMBER!NET_NAME!NET_ETCH_LENGTH!
DUT!H41!DDR3_DQ[19]!9498.34!
DUT!H42!DDR3_DQ[23]!9498.02!
J1!AX2!GND!333256.77!
J80!DS3!NOA_AVRB_STB[0]!7573.99!
C459!1!LDP1-16_VTT!7660.31!

In REFDES column you can see different type of data among those i need split DUT and J1-J80 values in specified Ranges in excel sheet.split would be like follows.
REFDES!PIN_NUMBER!NET_NAME!NET_ETCH_LENGTH!
DUT!H41!DDR3_DQ[19]!9498.34!
DUT!H42!DDR3_DQ[23]!9498.02!
REFDES!PIN_NUMBER!NET_NAME!NET_ETCH_LENGTH!
J1!AX2!GND!333256.77!
J80!DS3!NOA_AVRB_STB[0]!7573.99!

I don't know too much about VBA but I'm learning..
Your help would be much appreciated ..

mdmackillop
07-22-2010, 12:10 AM
Have you tried Data/Text to Columns?

Can you attach a text file using Manage Attachments in the Go Advanced reply section