View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Find Column heading and then Delete entire column

I bet if you try both versions, you won't notice a difference.



Kobayashi wrote:

Dave,

Many thanks indeed! Works a treat, although I didn't want the code to
execute anything should the value not be found so I took the liberty of
amending your code to:

If FoundCell Is Nothing Then
'not found
Else
FoundCell.EntireColumn.Delete
End If

to

If Not FoundCell Is Nothing Then
FoundCell.EntireColumn.Delete
End If

Many thanks again!

Best Regards,

Adrian

--
Kobayashi
------------------------------------------------------------------------
Kobayashi's Profile: http://www.excelforum.com/member.php...nfo&userid=871
View this thread: http://www.excelforum.com/showthread...hreadid=476777


--

Dave Peterson