Hi, I am working on a worksheet for our sale rep, with list of equipment which the macro removes all the rows that has no Qty in it
So far I use this:
Dim lastrow As Long, r As Long
lastrow = Cells(Rows.Count, "G").End(xlUp).Row
For r = 195 To 14 Step -1
If Cells(r, "c") = 0 Then
Rows(r).EntireRow.Delete
End If
Next r
Which I copied from one thread here and adapted it to my needs. ( I have to admit I don't understand the whole thing though)
It works fine, Qty is in column C, and it deletes everything that needs to be gone,
My main problem is that at the end of all the items there is notes and sales stuff and I which I could start removing not from a row number but from a certain cell I call "end" for now. Which is between the items and the sales notes.
I want the reps to be able to redo the macro that deletes row if they adjust values (as they often renew contracts with some items not needed to be charged again)
So basically, my question is how can we remove rows starting from a row that is not a fixed row number? but based on a cell value
is this even possible.
Thank you for your help.
So far I use this:
Dim lastrow As Long, r As Long
lastrow = Cells(Rows.Count, "G").End(xlUp).Row
For r = 195 To 14 Step -1
If Cells(r, "c") = 0 Then
Rows(r).EntireRow.Delete
End If
Next r
Which I copied from one thread here and adapted it to my needs. ( I have to admit I don't understand the whole thing though)
It works fine, Qty is in column C, and it deletes everything that needs to be gone,
My main problem is that at the end of all the items there is notes and sales stuff and I which I could start removing not from a row number but from a certain cell I call "end" for now. Which is between the items and the sales notes.
I want the reps to be able to redo the macro that deletes row if they adjust values (as they often renew contracts with some items not needed to be charged again)
So basically, my question is how can we remove rows starting from a row that is not a fixed row number? but based on a cell value
is this even possible.
Thank you for your help.