+ Reply to Thread
Results 1 to 6 of 6

Inserting columns in rows with some text

  1. #1

    Inserting columns in rows with some text

    Hello!
    I have a following problem. I have in Word a table with following rows:

    John
    180cm 65kg 20/17 ws
    Mike
    178cm 75kg 30/15 ns
    198753 198765 123 qd
    Kevin
    no data
    Tom
    173cm 73kg 40/18 es
    ....

    I would like to insert columns in some of rows to get something like
    that

    John
    180cm | 65kg | 20/17 | ws
    Mike
    178cm | 75kg | 30/15 | ns
    198753 | 198765 | 123 | qd
    Kevin
    no data
    Tom
    173cm | 73kg | 40/18 | es
    ....
    My table counts more than thousand rows so this makes way "by hand"
    useless.
    Is there any way in VBA to achieve that?
    Thank you in advance
    John Maly


  2. #2
    Jim May
    Guest

    RE: Inserting columns in rows with some text

    Just highlite the area in Word, Copy it -- Go to a new workbook sheet1
    cell A1 and Paste.
    Everything might well be in Column A only
    Highlight Col A from A1:A1000 (to the end) and
    at the menu, click on Data, Text to columns..
    follow wizard thru
    Write back if problems..
    HTH


    "[email protected]" wrote:

    > Hello!
    > I have a following problem. I have in Word a table with following rows:
    >
    > John
    > 180cm 65kg 20/17 ws
    > Mike
    > 178cm 75kg 30/15 ns
    > 198753 198765 123 qd
    > Kevin
    > no data
    > Tom
    > 173cm 73kg 40/18 es
    > ....
    >
    > I would like to insert columns in some of rows to get something like
    > that
    >
    > John
    > 180cm | 65kg | 20/17 | ws
    > Mike
    > 178cm | 75kg | 30/15 | ns
    > 198753 | 198765 | 123 | qd
    > Kevin
    > no data
    > Tom
    > 173cm | 73kg | 40/18 | es
    > ....
    > My table counts more than thousand rows so this makes way "by hand"
    > useless.
    > Is there any way in VBA to achieve that?
    > Thank you in advance
    > John Maly
    >
    >


  3. #3
    Jim May
    Guest

    RE: Inserting columns in rows with some text

    Just highlite the area in Word, Copy it -- Go to a new workbook sheet1
    cell A1 and Paste.
    Everything might well be in Column A only
    Highlight Col A from A1:A1000 (to the end) and
    at the menu, click on Data, Text to columns..
    follow wizard thru
    Write back if problems..
    HTH


    "[email protected]" wrote:

    > Hello!
    > I have a following problem. I have in Word a table with following rows:
    >
    > John
    > 180cm 65kg 20/17 ws
    > Mike
    > 178cm 75kg 30/15 ns
    > 198753 198765 123 qd
    > Kevin
    > no data
    > Tom
    > 173cm 73kg 40/18 es
    > ....
    >
    > I would like to insert columns in some of rows to get something like
    > that
    >
    > John
    > 180cm | 65kg | 20/17 | ws
    > Mike
    > 178cm | 75kg | 30/15 | ns
    > 198753 | 198765 | 123 | qd
    > Kevin
    > no data
    > Tom
    > 173cm | 73kg | 40/18 | es
    > ....
    > My table counts more than thousand rows so this makes way "by hand"
    > useless.
    > Is there any way in VBA to achieve that?
    > Thank you in advance
    > John Maly
    >
    >


  4. #4

    Re: Inserting columns in rows with some text

    Thank you for the tip but I know that is one of the solution.
    What I'm looking for is some way in Excel VBA to check row by row of
    the table and if row satisfies some conditions insert colums with given
    width.
    Any idea?
    John Maly


  5. #5
    Jim May
    Guest

    Re: Inserting columns in rows with some text

    My idea is still to drop the info, use text to columns (with spaces as
    delimiter);
    then as a last-step use VBA (to loop through) testing and making modifications
    where needed.

    "[email protected]" wrote:

    > Thank you for the tip but I know that is one of the solution.
    > What I'm looking for is some way in Excel VBA to check row by row of
    > the table and if row satisfies some conditions insert colums with given
    > width.
    > Any idea?
    > John Maly
    >
    >


  6. #6

    Re: Inserting columns in rows with some text

    Ok, but I don't know VBA so can you write me code which can test and
    modify rows and columns in my table (example is in my first post)?
    Thank you in advance
    John Maly


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1