Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old February 10th 19, 06:25 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2012
Posts: 17
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  
Old February 10th 19, 07:01 PM posted to microsoft.public.excel.programming
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.


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  
Old February 10th 19, 07:07 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,027
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 11:40 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017