Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
scriblesvurt
 
Posts: n/a
Default Deleting Cells, but not ones with formulars


Hello,

I have a large sheet that people enter data into each week. I want to
be able to hightlight a large area of the sheet and delete the data in
those selected cells, but not the formulars that are in some of the
cells.

Anyone know how I can do this?

Any help apreciated!

S


--
scriblesvurt
------------------------------------------------------------------------
scriblesvurt's Profile: http://www.excelforum.com/member.php...o&userid=24399
View this thread: http://www.excelforum.com/showthread...hreadid=380010

  #2   Report Post  
mangesh_yadav
 
Posts: n/a
Default


This worked for me:

Sub DeleteCells()

Set rng = Range("A1:B2")

For Each cl In rng
MsgBox cl.Formula
If cl.Formula = True Then
cl.ClearContents
End If
Next


End Sub


Put the code in a standard module and run.


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380010

  #3   Report Post  
scriblesvurt
 
Posts: n/a
Default


Hi,

This works apart from It puts up an OK box that you have to click for
each cell. This is a lot of clicking to clear 200+ cells. Any way to
change it so that it just runs right through?

Thanks,

S


--
scriblesvurt
------------------------------------------------------------------------
scriblesvurt's Profile: http://www.excelforum.com/member.php...o&userid=24399
View this thread: http://www.excelforum.com/showthread...hreadid=380010

  #4   Report Post  
scriblesvurt
 
Posts: n/a
Default


Got it,

I just removed

MsgBox cl.Formula

Thanks for this!

S


--
scriblesvurt
------------------------------------------------------------------------
scriblesvurt's Profile: http://www.excelforum.com/member.php...o&userid=24399
View this thread: http://www.excelforum.com/showthread...hreadid=380010

  #5   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Sorry, forgot to remove the Msgbox statement.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380010



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

Another way.

Select your cells to clean up.
Edit|goto|Special
click Constants
click ok
hit the delete key on the keyboard.

Don't select any cells that have labels you want to keep
(headers/instructions/etc).

scriblesvurt wrote:

Hello,

I have a large sheet that people enter data into each week. I want to
be able to hightlight a large area of the sheet and delete the data in
those selected cells, but not the formulars that are in some of the
cells.

Anyone know how I can do this?

Any help apreciated!

S

--
scriblesvurt
------------------------------------------------------------------------
scriblesvurt's Profile: http://www.excelforum.com/member.php...o&userid=24399
View this thread: http://www.excelforum.com/showthread...hreadid=380010


--

Dave Peterson
  #7   Report Post  
scriblesvurt
 
Posts: n/a
Default


Thats great. Thanks!!


--
scriblesvurt
------------------------------------------------------------------------
scriblesvurt's Profile: http://www.excelforum.com/member.php...o&userid=24399
View this thread: http://www.excelforum.com/showthread...hreadid=380010

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 merge two cells without deleting data from the cell? Batmans_Wife Excel Discussion (Misc queries) 50 April 3rd 23 10:54 AM
Deleting blank cells in a column KatyLady Excel Discussion (Misc queries) 6 May 30th 05 03:47 PM
deleting certain text from cells BLW Excel Worksheet Functions 1 May 18th 05 07:01 PM
Deleting #N/A from cells... Jambruins Excel Discussion (Misc queries) 3 February 22nd 05 11:36 PM
delete values in several cells without deleting the formulas dranreb Excel Discussion (Misc queries) 4 December 9th 04 01:15 AM


All times are GMT +1. The time now is 03:07 AM.

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"