Hi Everyone,
I am a newbie! I was hoping for some assistance with the following code. I am looking to have this code, find the criteria in a sheet and delete ALL rows with that criteria. This code only deletes the first record it comes across. I tried to play with a loop but I am not sure how to end it, and keep resulting in errors. Can anyone help, please? I am sure it is an easy fix... but every code I look at on while searching keeps giving me errors. This looks at a field "Reg4" value and then deletes the line off the sheet.
I am a newbie! I was hoping for some assistance with the following code. I am looking to have this code, find the criteria in a sheet and delete ALL rows with that criteria. This code only deletes the first record it comes across. I tried to play with a loop but I am not sure how to end it, and keep resulting in errors. Can anyone help, please? I am sure it is an easy fix... but every code I look at on while searching keeps giving me errors. This looks at a field "Reg4" value and then deletes the line off the sheet.
Code:
'delete the rows from quotes sheet
Set findvalue = Sheet10.Range("a:a").Find(What:=Reg4, LookIn:=xlValues)
findvalue.EntireRow.Delete