ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Command (https://www.excelbanter.com/excel-programming/311722-find-command.html)

Adam[_9_]

Find Command
 
I want to use the find command to find a cell that has a
specific value in the A column and the B column. I know
how to use the find command to find the row with the
value in the A column, but not when there is both. Thank
you.

Here is how I find the value in the A column


With wks_W.Range("A4:A" & WorksheetFinalRow)
Set n = .Find(answervalue, LookIn:=xlValues)
If Not n Is Nothing Then
i = n.Row
End With

Jim Rech

Find Command
 
In theory... After setting N check whether N.Offset(0,1).Value = "your
value". If yes you're done, if not do a FindNext and repeat.

--
Jim Rech
Excel MVP
"Adam" wrote in message
...
|I want to use the find command to find a cell that has a
| specific value in the A column and the B column. I know
| how to use the find command to find the row with the
| value in the A column, but not when there is both. Thank
| you.
|
| Here is how I find the value in the A column
|
|
| With wks_W.Range("A4:A" & WorksheetFinalRow)
| Set n = .Find(answervalue, LookIn:=xlValues)
| If Not n Is Nothing Then
| i = n.Row
| End With




All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com