View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
pm pm is offline
external usenet poster
 
Posts: 122
Default clearing data but retaining formulas

Hey Ron,
That worked...now I'm getting an #N/A in my formula fields. So, I need an
IF statement to blank the error???

"Ron Rosenfeld" wrote:

On Thu, 24 Jan 2008 08:17:08 -0800, pm wrote:

I have a macro that clears the contents of a range of cells; however, I would
like to keep the formulas in certain cells, just clear the data....how can I
do this? Thanks.


'Clear User Lists on Control Sheet
Sheets("Control").Select
Range("A8:E65536").Select
Selection.ClearContents
Range("A5").Select
Sheets("Control").Cells(5, 1) = UCase(Sheets("Control").Cells(5, 1))



Worksheets("Control").Range("A8:E65536").SpecialCe lls(xlCellTypeConstants).ClearContents


--ron