Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default removing values not links

Hi Jase,

Try:

Sub Tester04()
Dim col As Range
Dim Rng As Range
Dim CalcMode As Long

With Application
CalcMode = .Calculation
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With

ActiveSheet.UsedRange
For Each col In ActiveSheet.UsedRange.Columns
On Error Resume Next
Set Rng = Intersect(col.SpecialCells(xlConstants), col)
On Error GoTo 0
If Not Rng Is Nothing Then Rng.ClearContents
Next col

With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With

End Sub

Each column is processed sequentially to avoid known (8192 areas) problems
with large SpecialCells ranges.
---
Regards,
Norman



"Jase" wrote in message
...
Hi All

I have a worksheet with around 5000 rows and 10 columns. Held within
these
values are formulas and values. I am trying to get some code that removes
all of the values but does not touch the formula's.

I have been able to do this with a big loop, but this takes soooo long it
is
ridiculous. I was wondering if anyone else has come up with a more
efficent
way of accomplishing this task.

Thanks heaps
Jase



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
Removing Links Curtis Excel Worksheet Functions 3 November 4th 09 11:12 PM
Removing Intermediary Links FARAZ QURESHI Excel Discussion (Misc queries) 0 January 3rd 09 07:01 AM
Locating Links and Removing rmcompute Links and Linking in Excel 1 May 21st 07 02:12 PM
Removing links Dino Excel Worksheet Functions 2 October 5th 05 05:11 PM
Removing links Jon Excel Programming 1 January 22nd 04 11:21 PM


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