Consulting

Results 1 to 2 of 2

Thread: Split The Column Data based on first column values using VBA

  1. #1
    VBAX Newbie
    Joined
    Jul 2010
    Posts
    1
    Location

    Split The Column Data based on first column values using VBA

    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 ..

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Have you tried Data/Text to Columns?

    Can you attach a text file using Manage Attachments in the Go Advanced reply section
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •