Hello All,
I am trying to write some coding which has two outcomes depending on whether a certain value is found or not in an absolute reference region.
The first scenario is for when the value (in this case "INVOICE NO.") is found. In this case, the macro simply ends.
The second scenario is for when the value "INVOICE NO." is NOT found. In this case, the macro calls another macro named "Tabulating_overcharges_undercharges_results_part_2".
The absolute reference region is Range("I8:I33"). Note, however, that the sheet name should NOT be listed. This macro applies to the currently active sheet - whichever active sheet the macro is working on.
Here is the coding which needs to be fixed. The coding that's not working is in bold:
Sub AA_Find_Invoice_No()
'
' AA_Find_Invoice_No Macro
'
'
Range("I8:I33").Select
Selection.Find(What:="INVOICE NO.", After:=ActiveCell, LookIn:= _
xlFormulas2, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
If Not Rng Is Nothing Then
Else
Tabulating_overcharges_undercharges_results_part_2
End If
End Sub
Thanking you in advance,
Andrewstupendo
Bookmarks