Dear NG,

I want to delete rows that contain "#". I wrote a small macro for
this, which principally works, but always one row remains; it is
neither the first nor the last row and I have checked the macro
several time, but I don't find any mistake.
Here is the macro:


Dim z As Integer
Dim length As Integer

Anz_Zeilen = Sheets(Quelle).UsedRange.Rows.Count

With Sheets("Bereinigt")

    For Zeile = 2 To Anz_Zeilen

        length = Len(.Cells(Zeile, 1))

        For z = 1 To length

            If Mid(.Cells(Zeile, 1), z, 1) = "#" Then
                .Rows(Zeile).Delete
            End If

        Next z

    Next Zeile

End With

I appreciate any help & thanks in advance

Thomas

--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain  @ [email protected] or
Ashish Jain @ [email protected]
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to