Hi!
Every time I run the following macro, Excel crashes. I've tried it on two different machines one with 365, and the other with Microsoft Office Professional Plus 2016. I've turned off add-ins, and copied and pasted the code from the workbook module to the personal file. The file I'm running the macro on is an xlsx file. When i step through the code, the macro works fine and does not crash. The data that the macro is working on has a count of 5,915,363 cells, and the data is in a table.
I don't know what to try next.
Every time I run the following macro, Excel crashes. I've tried it on two different machines one with 365, and the other with Microsoft Office Professional Plus 2016. I've turned off add-ins, and copied and pasted the code from the workbook module to the personal file. The file I'm running the macro on is an xlsx file. When i step through the code, the macro works fine and does not crash. The data that the macro is working on has a count of 5,915,363 cells, and the data is in a table.
Code:
Sub ConvertFormulas()'
' ConvertFormulas Macro
'
Dim rng As Range, cell As Range
Set rng = Range("STARData")
rng.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
For Each cell In rng
If cell.Value = "x" Then
cell.ClearContents
End If
Next cell
End Sub
I don't know what to try next.