Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows based on cells having a floating pix
Hi, I have 2 columns. . What I want to do is to delete the rows where th cells of column B has a picture of a magnifying glass. Autofilte treted all the cells in B as blank. zip file containing sample file attached. thanks for any assist +------------------------------------------------------------------- |Filename: Book4.zip |Download: http://www.excelforum.com/attachment.php?postid=4479 +------------------------------------------------------------------- -- GottaRu ----------------------------------------------------------------------- GottaRun's Profile: http://www.excelforum.com/member.php...fo&userid=3129 View this thread: http://www.excelforum.com/showthread.php?threadid=52395 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows based on cells having a floating pix
I won't open your workbook, for many reasons, including potential virii.
However, this may work for you. Pictures don't reside in a cell, they reside in the Drawing Layer on top of cells. This macro will determine which pictures have the name "magnifying_glass" in them, and delete both the pictures and the rows that contain the cell over which the picture's top left corner lies. Public Sub DeleteRowsWithMagnifyingGlasses() Dim rDelete As Range Dim picTest As Picture For Each picTest In ActiveSheet.Pictures With picTest Debug.Print .Name If LCase(.Name) Like "magnifying_glass*" Then If rDelete Is Nothing Then Set rDelete = .TopLeftCell Else Set rDelete = Union(rDelete, .TopLeftCell) End If .Delete End If End With Next picTest If Not rDelete Is Nothing Then _ rDelete.EntireRow.Delete End Sub Modify the picture names to suit. In article , GottaRun wrote: Hi, I have 2 columns. . What I want to do is to delete the rows where the cells of column B has a picture of a magnifying glass. Autofilter treted all the cells in B as blank. zip file containing sample file attached. thanks for any assist. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I delete rows based on a category? | Excel Discussion (Misc queries) | |||
Delete Rows based on condition | Excel Discussion (Misc queries) | |||
Delete Rows based on value | Excel Worksheet Functions | |||
Delete Rows Based On Content | Excel Programming | |||
Delete Rows Based On Content | Excel Programming |