#1
|
|||
|
|||
Find and Replace multiple table columns
I have a large table in Word where I would like to do a Find and Replace based on multiple columns. Example:
If Column A = "IO", then replace Column C with "YES". Is this possible? Or would it be easier just to copy it into excel, make the change, and copy back? |
#2
|
||||
|
||||
You can do it in Word easily enough. Assuming IO is the content if the cell and not part of the content then the following macro will work
Code:
Sub GetIO() Dim oRow As Row Dim oCell As Range For Each oRow In Selection.Tables(1).Rows Set oCell = oRow.Cells(1).Range oCell.End = oCell.End - 1 If oCell.Text = "IO" Then oRow.Cells(3).Range.Text = "YES" Next oRow End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro for find/replace (including headers and footers) for multiple documents | jpb103 | Word VBA | 2 | 05-16-2014 04:59 AM |
How do I find/replace the same word in multiple documents? | Ineedhelp! | Word | 3 | 03-04-2014 03:50 PM |
How do I find and replace multiple items at once? | redzan | Word VBA | 1 | 05-16-2013 08:25 AM |
Find and Replace multiple lines/paragraphs | jcw | Word | 1 | 11-18-2011 11:47 AM |
Find and replace multiple documents change style | BaPW | Word | 0 | 08-14-2011 11:12 AM |