Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Aide sur une procédure

3 réponses
Avatar
Alain Lebayle
Bonjour,
J'essaie de faire fonctionner quelque chose comme cela, supprimer
également la cellule qui se trouve à droite

Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
.Range("R1:R26").Replace What:=Range("T1").Value, _
Replacement:="" & Offset(0, 1).Value = ""
.Protect Password:="toto"
End With
Application.ScreenUpdating = True

Je vous remercie
Alain

3 réponses

Avatar
Jacky
Bonjour,

Ceci peut-être...
'--------------
Sub jj()
Dim c As Range
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
For Each c In .Range("R1:R26")
If c.Value = [T1] Then Range(c, c.Offset(, 1)).ClearContents
Next
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub
'-----------

--
Salutations
JJ


"Alain Lebayle" a écrit dans le message de news:

Bonjour,
J'essaie de faire fonctionner quelque chose comme cela, supprimer également la cellule qui se trouve à
droite

Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
.Range("R1:R26").Replace What:=Range("T1").Value, _
Replacement:="" & Offset(0, 1).Value = ""
.Protect Password:="toto"
End With
Application.ScreenUpdating = True

Je vous remercie
Alain
Avatar
Jacky
Re...
Quelques "." (point) se sont subtilisés ;o))
'------------------
Sub jj()
Dim c As Range
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
For Each c In .Range("R1:R26")
If c.Value = .[T1] Then Range(c, c.Offset(, 1)).ClearContents
Next
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub
'-------------------

--
Salutations
JJ


"Jacky" a écrit dans le message de news:
Bonjour,

Ceci peut-être...
'--------------
Sub jj()
Dim c As Range
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
For Each c In .Range("R1:R26")
If c.Value = [T1] Then Range(c, c.Offset(, 1)).ClearContents
Next
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub
'-----------

--
Salutations
JJ


"Alain Lebayle" a écrit dans le message de news:

Bonjour,
J'essaie de faire fonctionner quelque chose comme cela, supprimer également la cellule qui se trouve à
droite

Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
.Range("R1:R26").Replace What:=Range("T1").Value, _
Replacement:="" & Offset(0, 1).Value = ""
.Protect Password:="toto"
End With
Application.ScreenUpdating = True

Je vous remercie
Alain




Avatar
Alain Lebayle
Bonjour Jacky,
C'est parfait grand merci !!!
Alain

Jacky a écrit :
Re...
Quelques "." (point) se sont subtilisés ;o))
'------------------
Sub jj()
Dim c As Range
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
For Each c In .Range("R1:R26")
If c.Value = .[T1] Then Range(c, c.Offset(, 1)).ClearContents
Next
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub
'-------------------