Je voudrais modifier ma macro ci-dessous pour qu'elle ne recherche que dans les cellules utilisées des colonnes J à M (UsedRange).
J'ais essayé avec la fonction UsedRange, mais ça ne fonctionne pas
HTML:
Sub macro()
Dim Cell As Range
For Each Cell In ActiveSheet.Range("J1:M1").EntireColumn.Cells
If Cell.Text = "0" Then Cell.ClearContents
Next Cell
End Sub
Option Explicit
Sub Zéro_supprimer()
Dim c As Range
On Error Resume Next
For Each c In [j:m].SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeConstants)
If c = 0 Then c = ""
Next
End Sub