View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Easy Makro for Deleting Rows

Or...

If trim(rCell.Value) = "" _
rcell.value = 0 Then



Tatebana wrote:

No, unfortunately it does not work, probably because some cells contain 1, 2
or three spaces, others contain 0. The row with 0 should also be deleted.

One would, I guess, have to test for 0, empty cells ("") and spaces (" ")

"Vergel Adriano" wrote:

Hi,

in the line where you check for the value of the cell, test the Text
property if it's equal to "0" instead. For example, in the code from JE
McGimpsey, instead of this line

If rCell.Value = 0 Then

try it this way

If rCell.Text= "0" Then

And in the code from me, you would use


If .Text = "0" Then



--
Hope that helps.

Vergel Adriano


"Tatebana" wrote:

Oh my God! As I copied the data from the net, I oversaw that the "empty"
cells contained blanks...! Shame on me.

That, however could lead to the question: Can these blanks be detected? I
could replace them first, of course with a simple formula, but that would
also eliminate the blanks in text, where they are necessary.


--

Dave Peterson