LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Delete Contents of Cells

Hi,

Wonder if someone can help me please.

I have a spreadsheet with cells that look blank, they have do visible data
or formula in them however, when I run a macro to try and copy cells into
them, it fails.

I have therefore looked at just running a bit of code that within a given
range where it finds a blank cell it deletes the content.

Could someone have a look at the code below that I am using to see where i I
am going wrong because it doesn't seem to work.

Sub Delete_Cell_Contents()

Range("A2:I65536").Select
If Value = "" Then
Selection.ClearContents
End If

End Sub


Thanks very much

Chris
 
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
Delete contents unlocked cells RobN[_3_] Excel Discussion (Misc queries) 9 December 13th 07 10:34 PM
Delete contents in cells with macro dford Excel Discussion (Misc queries) 4 February 4th 07 12:39 PM
Delete contents of cells mikespeck Excel Worksheet Functions 3 July 27th 06 03:16 PM
How do I delete the contents of unprotected cells only? Dan Excel Discussion (Misc queries) 3 August 8th 05 08:18 PM
Delete specific cells contents in a row with some locked cells in the same row trussman Excel Programming 2 March 1st 05 06:12 PM


All times are GMT +1. The time now is 07:25 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"