Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Deleting cells in Macro

I have a macro that compares two sets of data. Sometimes there isn't data and
so there is a #DIV/0! symbol. How do i go through the cells and delete all of
these?

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Deleting cells in Macro

Try this for column A

With Columns("A:A")
On Error Resume Next
.SpecialCells(xlCellTypeFormulas, 16).ClearContents
On Error GoTo 0
End With


--
Regards Ron de Bruin
http://www.rondebruin.nl


"MSHO" wrote in message ...
I have a macro that compares two sets of data. Sometimes there isn't data and
so there is a #DIV/0! symbol. How do i go through the cells and delete all of
these?

Thanks in advance



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
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
MACRO HELP - deleting rows containing a range of blank cells DavidHawes Excel Discussion (Misc queries) 9 February 26th 07 03:40 PM
deleting unused cells / getting rid of inactive cells Woody13 Excel Discussion (Misc queries) 3 January 26th 06 09:11 PM
Macro For Deleting Cells Containing A Number brazen234[_8_] Excel Programming 9 January 15th 06 09:32 PM
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content rmaloy Excel Programming 5 February 9th 04 01:59 AM


All times are GMT +1. The time now is 09:53 AM.

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

About Us

"It's about Microsoft Excel"