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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Last Columns in Tables
Hi. I am using MS WORD XP. I have a file full of many
tables separated by paragraphs. The number of columns in the tables varies. I want to do a search for something in certain columns, and when the search finds a particular thing (such as a specific word or number), select the entire column and then extend the selection to the end of the table, that is, the last column. Holding down the Shift key only expands the selection to the next columnn to the right. I want to extend the selection to all the columns to the right of the selection (which vary in number according to number of columns in the table). Can this be done? Thanks. |
#2
|
|||
|
|||
Last Columns in Tables
Use a macro containing the following code:
Dim myrange As Range Set myrange = Selection.Columns(1).Cells(1).Range myrange.End = Selection.Tables(1).Range.End myrange.Select -- Please post any further questions or followup to the newsgroups for the benefit of others who may be interested. Unsolicited questions forwarded directly to me will only be answered on a paid consulting basis. Hope this helps Doug Robbins - Word MVP "Sally" wrote in message ... Hi. I am using MS WORD XP. I have a file full of many tables separated by paragraphs. The number of columns in the tables varies. I want to do a search for something in certain columns, and when the search finds a particular thing (such as a specific word or number), select the entire column and then extend the selection to the end of the table, that is, the last column. Holding down the Shift key only expands the selection to the next columnn to the right. I want to extend the selection to all the columns to the right of the selection (which vary in number according to number of columns in the table). Can this be done? Thanks. |
Thread Tools | |
Display Modes | |
|
|