Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find finds nothing, and errors
I have a Selection.find function that errors out if it
does not find the value. I'd like to make it skip this section if it does not find anything. Here's my code: Private Sub Findtotal() Dim Cell As Range, LastCell As String Application.ScreenUpdating = False Columns("A:A").Select Selection.Find(What:="Fees", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(1, 0).End(xlDown)).Select For Each Cell In Selection If Not IsEmpty(Cell) Then Cell = Cell & " FEES" Next I'm not exactly sure how to make it work correctly wether or not it finds anything. Thanks in advance for any help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find errors in documents | Excel Discussion (Misc queries) | |||
Find and Replace Lookup errors | Excel Discussion (Misc queries) | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
To find errors | New Users to Excel | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions |