Hi all,
I have worksheet with a large pivot table, and a button for users to push to "export" the sheet into a new workbook and paste as values (to make the file smaller). Part of what the code does is find all the numbers in the data part of the pivot table (or rather, where the PT was since it's now values), and replaces them with Xs. The find/replace code works ok, but (feel liks it) takes a long time to run. Here is what I have:
Is this the most efficient way to do this? Or is there something spiffier/faster? Thanks!
- Jill
I have worksheet with a large pivot table, and a button for users to push to "export" the sheet into a new workbook and paste as values (to make the file smaller). Part of what the code does is find all the numbers in the data part of the pivot table (or rather, where the PT was since it's now values), and replaces them with Xs. The find/replace code works ok, but (feel liks it) takes a long time to run. Here is what I have:
Code:
Sub ReplaceNumbers()
Dim c As Range
For Each c In Range("d12:dx500")
If c <> "" Then
c = "X"
End If
Next c
End Sub
- Jill