Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
I have a situation like this:
https://imgur.com/a/1MTsnEQ
I need, for the range B2:R2, to delete all the value "closed" except for the first.
My attempt is not concluded successfully (I can count the occurrences, but not delete).
I have a situation like this:
https://imgur.com/a/1MTsnEQ
I need, for the range B2:R2, to delete all the value "closed" except for the first.
My attempt is not concluded successfully (I can count the occurrences, but not delete).
Code:
Dim rng As Range
Dim q As Integer
Set rng = Worksheets("Foglio1").Range("B2:R2")
q = Application.WorksheetFunction.CountIf(rng, "*closed*")