View Single Post
  #2   Report Post  
Old February 10th 19, 07:01 PM posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,692
Default Searching cell with zero value and delete their content

Hi Norbert,

Am Sun, 10 Feb 2019 10:25:06 -0800 (PST) schrieb Norbert:

I have a range of cells which I'd like to search for the value "0%" (or just 0) and then I'd like to delete all these zero values.

The cell range is M17:AF17

All I want is to delete the zero values in that range.


Sub DeleteZeros()
Dim rngC As Range

For Each rngC In Range("M17:AF17")
If rngC = 0 Then rngC.ClearContents
End Sub

Claus B.
Office 2016