![]() |
#1
|
|||
|
|||
![]()
I have many table in a document. I want to search input data (stored in variable with input box) in first column of all the table and paste a variable data (stored in variable with input box) in the third column after text in the same row. I want to do the search & input data for multiple text one after another as many as.
My trying code Dim FirstName As String FirstName = InputBox("Type text", "") Dim LastName As String LastName = InputBox("Search BD No", "") Selection.Find.ClearFormatting With Selection.Find .Text = LastName .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.MoveRight Unit:=wdCell Selection.MoveRight Unit:=wdCell Selection.MoveRight Unit:=wdCell Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.TypeText Text:=FirstName End Sub |
Tags |
array, search, table |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to search with column heading then doing the lookup action for below code | cmreddy.vba | Excel Programming | 0 | 01-20-2015 03:44 AM |
VBA to search each row of a word table column | Marrick13 | Word VBA | 7 | 11-17-2014 04:33 AM |
![]() |
IRollman | Excel Programming | 1 | 01-14-2014 01:05 PM |
Excel Fomula to search for a string and display value from different column | zeeshanbutt | Excel | 1 | 07-29-2012 12:48 AM |
![]() |
pdfaust | Excel | 2 | 02-03-2011 03:02 PM |