Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Searching cell with zero value and delete their content

Hi everybody,

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.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
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.


try:

Sub DeleteZeros()
Dim rngC As Range

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


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Searching cell with zero value and delete their content

Hi everybody,

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.

Thanks


Do you mean you want to hide zero values? Do you know that option canned be
turned off (OptionsViewWindowOptions) so cells with zero values appear empty?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete cell formats but not the content... Penndaryl Excel Discussion (Misc queries) 1 May 17th 10 04:55 PM
Delete previous cell content Craig Excel Worksheet Functions 2 May 14th 10 09:06 PM
Cell searching and delete function Dan C.[_2_] Excel Discussion (Misc queries) 3 July 15th 09 07:21 PM
Delete cell content Chuck Neal Excel Discussion (Misc queries) 3 June 14th 06 05:05 PM
can't delete a cell content in excel Mark B New Users to Excel 3 May 6th 05 06:42 PM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"