Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default 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


" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default 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.

" 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Inserting rows/columns Jase Excel Discussion (Misc queries) 3 April 15th 08 11:38 PM
Question Inserting Rows & Columns sheana New Users to Excel 2 February 5th 08 11:22 PM
Inserting columns & rows in worksheets Wylie Coyote Excel Worksheet Functions 3 September 16th 06 09:43 PM
Static formula when inserting new rows/columns? nfe Excel Discussion (Misc queries) 4 May 2nd 06 02:55 PM
inserting columns within certain rows only crimsonkng Excel Discussion (Misc queries) 4 July 14th 05 05:13 PM


All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"