LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default To delete certain data in excel. eg contains #DIV/0?

Sub ClearDivideByZero()
Dim rng as Range, cell as Range
set rng = cells.specialcells(xlFormulas,xlErrors)
for each cell in rng
if cell.Text = "#DIV/0" then
cell.ClearContent
end if
Next
End Sub

--
Regards,
Tom Ogilvy


"Winter" wrote:

I have a set of data that I applied "If" condition.How to empty the cell with
result "#DIV/0" ?

 
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
Excel - 2003 - Delete data if conditions met Arceedee Excel Discussion (Misc queries) 8 January 19th 09 06:11 PM
delete bad data point in excel 2007 Abu M.P. Hussain New Users to Excel 1 June 23rd 08 03:26 PM
Excel - how do I delete data but not formulae? AlanStPaul Excel Discussion (Misc queries) 3 August 26th 07 11:26 AM
delete repeated data in excel Alex Excel Discussion (Misc queries) 2 May 5th 07 11:04 PM


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

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"