Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting the cell that a vlookup or match function references
I would like to use vlookup or match to find a record in a database. Once
vlookup or match finds it, I would like to select the whole row. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting the cell that a vlookup or match function references
You can give this a try... It searches all of the cells on a sheet. We can
narrow that down to a column or such if you need... Sub FindRow() Dim rngFound As Range Set rngFound = Cells.Find(What:="This", _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry ""This"" was not found" Else rngFound.EntireRow.Select End If End Sub -- HTH... Jim Thomlinson "Elceller in distress" wrote: I would like to use vlookup or match to find a record in a database. Once vlookup or match finds it, I would like to select the whole row. Is this possible? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting the cell that a vlookup or match function reference
Can I make it just search in one colum and then select the row of the search
result. In other words, I only want it to find matches in colum L, then select the entire row associated with that key word. "Jim Thomlinson" wrote: You can give this a try... It searches all of the cells on a sheet. We can narrow that down to a column or such if you need... Sub FindRow() Dim rngFound As Range Set rngFound = Cells.Find(What:="This", _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry ""This"" was not found" Else rngFound.EntireRow.Select End If End Sub -- HTH... Jim Thomlinson "Elceller in distress" wrote: I would like to use vlookup or match to find a record in a database. Once vlookup or match finds it, I would like to select the whole row. Is this possible? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting the cell that a vlookup or match function reference
Something like:
Sub FindRow() Dim rngFound As Range Set rngFound = range("L:L").Cells.Find(What:="This", _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry ""This"" was not found" Else rngFound.EntireRow.Select End If End Sub But the code already selects the whole row where it was found. Elceller in distress wrote: Can I make it just search in one colum and then select the row of the search result. In other words, I only want it to find matches in colum L, then select the entire row associated with that key word. "Jim Thomlinson" wrote: You can give this a try... It searches all of the cells on a sheet. We can narrow that down to a column or such if you need... Sub FindRow() Dim rngFound As Range Set rngFound = Cells.Find(What:="This", _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry ""This"" was not found" Else rngFound.EntireRow.Select End If End Sub -- HTH... Jim Thomlinson "Elceller in distress" wrote: I would like to use vlookup or match to find a record in a database. Once vlookup or match finds it, I would like to select the whole row. Is this possible? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
match vlookup function | Excel Discussion (Misc queries) | |||
Selecting a diff. worksheet but same cell references using Validat | Excel Worksheet Functions | |||
vlookup/ match or other function?? | Excel Worksheet Functions | |||
Match function selecting first value it matches on exactly | Excel Worksheet Functions | |||
Using Cell references in VLookUp | Excel Worksheet Functions |