Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default How to detect if cells text go on other column ?

Hi,
I copy an paste a table from excel to word. If cells are merged or text go
to an other column in excel, Word will merged theses cells. I would like to
find a way to know if the cells has been merged in Word ?

Example: if the table has 3 columns in excel and column 1 and 2 are merged.
Cells(1,3) in excel will refer the column #3 in excel but cells(1,2) in Word
will refer to the same column. So, I could add a vector:
myVector(1) = 1
myVector(2) = 3
In Word, I will say:
For i = 1 To tbl.Rows.Count 'word table
For j = 1 To tbl.Rows(i).cells.Count
tbl.Cell(i, j).Value = rngExcel.Cells(i, MyVector(j)).Value
Next j
Next i

How can I create MyVector(i) ? Does anyone know how to detect if a cell go
to an other column.

Thanks !
--
Alex St-Pierre
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
Display cells(text) in one column based on cells which are present inother column [email protected] Excel Discussion (Misc queries) 1 May 12th 08 01:40 PM
How to detect changes in a column? inomata Excel Discussion (Misc queries) 0 December 14th 05 08:26 PM
detect column name of last populated data ilyaskazi[_50_] Excel Programming 3 July 25th 05 09:53 AM
How do I detect the first empty cell is column A PJ0779 Excel Programming 1 February 25th 05 05:14 PM
How do I detect the first empty cell is column A PJ0779 Excel Programming 0 February 25th 05 04:53 PM


All times are GMT +1. The time now is 07:28 AM.

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

About Us

"It's about Microsoft Excel"