Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Delete content but not formulas

I was asked if there is a way to remove the content of spreadsheets but to
keep the formulas. I'm not sure why the person wants to do this, but want to
give them a correct answer. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 389
Default Delete content but not formulas

To remove values only from Excel:
Select all cells on the worksheet, or just one cell.
Press F5 (or Ctrl + G or Edit - Goto)
Click the "Special" button.
Click "Constants"
Numbers, Text, Logicals, Errors should be checked.
Click OK.
Press Del (or Edit - Clear - Contents)
Repeat for other worksheets as needed.

Or use a macro -- for just the active sheet:
Sub RemoveValuesOnly()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.Cells
If Not cell.HasFormula Then
cell.ClearContents
End If
Next
End Sub

Or for every worksheet in the active workbook:
Sub RemoveValuesOnly()
Dim cell As Range, wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
For Each cell In wks.UsedRange.Cells
If Not cell.HasFormula Then
cell.ClearContents
End If
Next
Next
End Sub

--
Tim Zych
http://www.higherdata.com
Workbook Compare - Excel data comparison utility
Free and Pro versions


"Jake F" wrote in message
...
I was asked if there is a way to remove the content of spreadsheets but to
keep the formulas. I'm not sure why the person wants to do this, but want
to
give them a correct answer. Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Delete content but not formulas

Use Edit| GoTo Special; specify Constants and tap the Delete key
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Jake F" wrote in message
...
I was asked if there is a way to remove the content of spreadsheets but to
keep the formulas. I'm not sure why the person wants to do this, but want
to
give them a correct answer. Thanks.



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
Auto delete cell content [email protected] Excel Discussion (Misc queries) 1 March 13th 07 01:43 PM
How to transpose formulas from column content to row content. Notrom Excel Worksheet Functions 1 October 12th 06 06:57 PM
DELETE CONTENT ADVISOR??? boyd66 Setting up and Configuration of Excel 1 August 26th 06 05:59 PM
Delete cell content Chuck Neal Excel Discussion (Misc queries) 3 June 14th 06 05:05 PM
Delete rows by content Raza Excel Worksheet Functions 3 November 19th 05 09:20 PM


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