try this macro

Sub delete()

    Dim FoundCell As Range

    Dim myRng As Range
    Dim sh As Worksheet



    Set sh = Sheets("Dump")

    Set myRng = sh.Range("A:A")


                    Set FoundCell =
myRng.Find(What:=Sheets("main").Range("b16").Value, After:=Range("a1"), _
                LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
                SearchDirection:=xlNext, MatchCase:=False)

                    If FoundCell Is Nothing Then
                        Exit Sub
                    Else
                        FoundCell.EntireRow.delete
                    End If



End Sub

On Sun, Nov 28, 2010 at 3:47 PM, SAJID MEMON <sajidwi...@hotmail.com> wrote:

>  dear Dilip & ashish koul
>
> Sheets("Dump").Range("a1:D65356").Clear
>
> If i do the above line in attached project then entire data will be
> deleted.
>
>
> My doubt is only pink color data display should be deleted from dump sheet.(I 
> have attached file again to try to understanding you my doubt )
>
> With awaiting your reply
>
> Sajid Memon
> +91 94376 38986. (Orissa, India)
>
>
>
>
> --
>
> ----------------------------------------------------------------------------------
> 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/pages/discussexcelcom/160307843985936?v=wall&ref=ts
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com <http://akoul.blogspot.com/>
*akoul*.wordpress.com <http://akoul.wordpress.com/>
My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
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/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to