Hi Mahesh,

Find below coding to delete the contains  "0" value from 13th row of column "P".

Sub Zero_data()
    Dim Firstrow As Long
    Dim Lastrow As Long
    Dim Lrow As Long
    Dim CalcMode As Long
    Dim ViewMode As Long
    Dim rng As Range

    With Application
        CalcMode = .Calculation
        .Calculation = xlCalculationManual
        .ScreenUpdating = False
    End With

    With ActiveSheet

        .Select
        ViewMode = ActiveWindow.View
        ActiveWindow.View = xlNormalView


        .DisplayPageBreaks = False
        Firstrow = .UsedRange.Cells(13).Row
        Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row

        For Lrow = Lastrow To Firstrow Step -1

            With .Cells(Lrow, "P")

                If Not IsError(.Value) Then

                    If .Value = "0" Then
                        If rng Is Nothing Then
                            Set rng = .Cells
                        Else
                            Set rng = Application.Union(rng, .Cells)
                        End If
                    End If

                End If
            End With

        Next Lrow

    End With

    If Not rng Is Nothing Then rng.EntireRow.Delete

    ActiveWindow.View = ViewMode
    With Application
        .ScreenUpdating = True
        .Calculation = CalcMode
    End With

End Sub

Regards,
Shrinivas



________________________________
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On 
Behalf Of Prabhu
Sent: Thursday, August 11, 2011 9:45 PM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ ***Macro Code Required to delete Zero value cell 
and its row***

Hi Mahesh,

It is deleting entire row wherever zero appearing. But i required in a 
partiuclar column if Zero value found we need to delete entire row.

Ex. If we use base as  "P" column, In 13th row of "P" column contains "0" value 
it has to delete entire 13th Row. It should not search other columns.

Regards,

Prabhu

--
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to