-
I see, processing an entire column will take some time.
This version tests each cell and only processes cells with a value.
[vba]
Sub Convert_to_Values()
Dim oCell As Object
For Each oCell In Selection
If Len(oCell.Value) <> 0 Then
oCell.NumberFormat = "General"
oCell.Value = oCell.Value
End If
Next oCell
Set oCell = Nothing
End Sub
[/vba]
If each column doesn't contain any blanks before the end of the data you could try
[vba]
Sub Convert_to_Values()
Dim oCell As Object
For Each oCell In Selection
If Len(oCell.Value) = 0 Then
Exit For
Else
oCell.NumberFormat = "General"
oCell.Value = oCell.Value
End If
Next oCell
Set oCell = Nothing
End Sub
[/vba]
Also, instead of stopping excel in the task manager try using Ctrl + [Break] to stop the code running.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules