A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cannot access individual rows because table has vertically merged



 
 
Thread Tools Display Modes
  #1  
Old July 28th, 2004, 02:45 PM
Peter
external usenet poster
 
Posts: n/a
Default Cannot access individual rows because table has vertically merged

I have a four column table where column 1 is the "key" and entries are by row. I want to locate a row by the value stored in column 1, then access the values in columns 3 and 4 of that row. Some rows however are split in columns 3 & 4 such that there are two or more rows. I guess word sees it as column 1 is merged over several rows. If I try to access the individual rows in column 3 that are associated with the value in row i of column 1 with .Rows(i).Cells(3) I get the error message in the subject. If I use .Columns(3).Cells(i), I get no error message but I have no way of knowing which row in column 1 it pertains to.
Does anyone have any ideas how to go about doing this?
  #2  
Old August 4th, 2004, 09:03 PM
Klaus Linke
external usenet poster
 
Posts: n/a
Default Cannot access individual rows because table has vertically merged

Hi Peter,

If you have already located the "key" cell in column 1, you could just move
to the third column:
..Move Unit:=wdCell, Count:=2

It's true that Word treats the cells in other columns as "merged" if you
have split a cell in some column vertically.

To get the indices that Word uses:
numRow = Selection.Information(wdStartOfRangeRowNumber)
numCol = Selection.Information(wdStartOfRangeColumnNumber)

And to select that cell:
myTable.Cell(row:=numRow,column:=numCol).Select

BTW, what version do you use? If I follow your example in Word2002, I can't
even access columns any more ... that is, Columns(3).Cells(i) gives an
error message 5992 about "mixed cell widths", though all cells have the
same width :-(

Regards,
Klaus



Peter wrote:
I have a four column table where column 1 is
the "key" and entries are by row. I want to
locate a row by the value stored in column 1,
then access the values in columns 3 and 4 of
that row. Some rows however are split in columns
3 & 4 such that there are two or more rows.
I guess word sees it as column 1 is merged over
several rows. If I try to access the individual rows
in column 3 that are associated with the value in row
i of column 1 with .Rows(i).Cells(3) I get the error
message in the subject. If I use .Columns(3).Cells(i),
I get no error message but I have no way of knowing
which row in column 1 it pertains to.
Does anyone have any ideas how to go about doing this?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TRIGGER a VIEW with SQL for a LINKED SERVER (ACCESS DB) youssef General Discussion 10 July 13th, 2004 12:00 AM
Table Error Message Di New Users 2 June 30th, 2004 07:57 AM
Need help with Access decision aualias General Discussion 23 June 21st, 2004 02:04 AM
resize table from A4 size to A5 ims New Users 3 June 9th, 2004 01:05 AM
Pivot Table Too Many Rows Or Colums Joe Worksheet Functions 0 October 9th, 2003 05:17 PM


All times are GMT +1. The time now is 04:11 PM.


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