Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using a macro based on the cells.find feature, and I want to make
it stop searching at a certain row. Otherwise, it always finds the specific value back at the place where I entered it after the search loops through the whole column. Here is the code I have: Sub Look_Here1() Dim FoundCell As Range Dim WhatFor As Variant WhatFor = ActiveSheet.Cells(7, 2).Value Set FoundCell = Cells.Find(What:=WhatFor, after:=ActiveCell, _ SearchDirection:=xlNext, searchorder:=xlByRows, _ MatchCase:=False) FoundCell.Offset(0, -1).Select ActiveCell.FormulaR1C1 = "X" Selection.Offset(0, 4).Select End Sub Is there anything I can add to that to make it stop at, say, B990,? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i build a search table in excel | Excel Worksheet Functions | |||
build a search tool in excel | Excel Discussion (Misc queries) | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) | |||
Cells.Find , why it DOESN'T search ? help | New Users to Excel | |||
FAQ Spreadsheet with search function | Excel Discussion (Misc queries) |