Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete rows based on a category? suzy Excel Discussion (Misc queries) 1 January 19th 10 03:05 PM
Delete Rows based on condition Vic Excel Discussion (Misc queries) 2 August 18th 09 08:54 PM
Delete Rows based on value Sabosis Excel Worksheet Functions 4 October 28th 08 11:21 PM
Delete Rows Based On Content halem2[_39_] Excel Programming 0 October 12th 04 03:27 PM
Delete Rows Based On Content halem2[_38_] Excel Programming 1 October 12th 04 03:16 PM


All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"