Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vb code question
I have 3 columns that have data of which column A has the criteria I want to
search for. Once found, I want to select columns A, B, and C that match the search criteria ( in this case "7760"). The code below allows me to find the criteria and select columns A, B, and C although I don't know how to tell it to find all rows that match the criteria in column A. In other words, I don't know how to tell it to go to the last row that has 7760 in column A. If you can assist I would be more than greatful! Many thanks! Dim rng As Range Cells(1, 1).Select Set rng = Range("A1:IV65400").Find(What:="7760", _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) If Not rng Is Nothing Then ActiveCell.End(xlDown).Offset(0, 3).Select End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vb code question
On Apr 24, 5:16 pm, Stan wrote:
I have 3 columns that have data of which column A has the criteria I want to search for. Once found, I want to select columns A, B, and C that match the search criteria ( in this case "7760"). The code below allows me to find the criteria and select columns A, B, and C although I don't know how to tell it to find all rows that match the criteria in column A. In other words, I don't know how to tell it to go to the last row that has 7760 in column A. If you can assist I would be more than greatful! Many thanks! Dim rng As Range Cells(1, 1).Select Set rng = Range("A1:IV65400").Find(What:="7760", _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) If Not rng Is Nothing Then ActiveCell.End(xlDown).Offset(0, 3).Select End If Do you just want it to select the last row, or select all of the rows? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vb code question
I would like to select all the rows in columns A, B, and C where column A =
7760 "Rob" wrote: On Apr 24, 5:16 pm, Stan wrote: I have 3 columns that have data of which column A has the criteria I want to search for. Once found, I want to select columns A, B, and C that match the search criteria ( in this case "7760"). The code below allows me to find the criteria and select columns A, B, and C although I don't know how to tell it to find all rows that match the criteria in column A. In other words, I don't know how to tell it to go to the last row that has 7760 in column A. If you can assist I would be more than greatful! Many thanks! Dim rng As Range Cells(1, 1).Select Set rng = Range("A1:IV65400").Find(What:="7760", _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) If Not rng Is Nothing Then ActiveCell.End(xlDown).Offset(0, 3).Select End If Do you just want it to select the last row, or select all of the rows? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB Code Question | Excel Discussion (Misc queries) | |||
Code Question | Excel Programming | |||
Code question | Excel Programming | |||
VBA code question?! | Excel Programming |