Hi all,
I have a macro that works fine, except it performs the steps one time too many.
As far as I can figure it, once it realises that If Not c is Nothing is no longer true (i.e. c is Nothing), it still performs all of the steps afterwards one more time before ending the loop.
Can anyone help with adjusting the code (below) so that it stops doing this?
Thanks for your assistance
I have a macro that works fine, except it performs the steps one time too many.
As far as I can figure it, once it realises that If Not c is Nothing is no longer true (i.e. c is Nothing), it still performs all of the steps afterwards one more time before ending the loop.
Can anyone help with adjusting the code (below) so that it stops doing this?
Code:
Sub Macro1()
'
' Macro1 Macro
'
Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp))
Do
Set c = SrchRng.Find("Bob:", LookIn:=xlValues)
If Not c Is Nothing Then c.Select
Selection.Cut
ActiveCell.Offset(-1, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Loop While Not c Is Nothing
'
End Sub
Thanks for your assistance