BINOD SHARMA
New Member
- Joined
- Feb 12, 2020
- Messages
- 5
- Office Version
- 2007
Dear all, i am new in Excel VBA . A specific Excel Sheet Column range value having some Negative Numbers. I want to Replace with a certain value like " 5000" by VBA code.
I run the following vba macro for the same purpose, but it's work very slow. My column row range length are almost 65,000 rows.
My using code is -
Dim ws As Worksheet
Dim i As Variant
Set ws = Worksheets("DEPSHADO")
'convert negative numbers to positive
For i = 3 To 65000
If ws.Range("D" & i) <> "" Then
If ws.Range("D" & i).Value < 0 Then
ws.Range("E" & i).Value = 5100
End If
End If
Next i
It's run very slow as 120 seconds. Kind advise a suitable VBA macro to perform faster.
Regards
BINOD SHARMA
I run the following vba macro for the same purpose, but it's work very slow. My column row range length are almost 65,000 rows.
My using code is -
Dim ws As Worksheet
Dim i As Variant
Set ws = Worksheets("DEPSHADO")
'convert negative numbers to positive
For i = 3 To 65000
If ws.Range("D" & i) <> "" Then
If ws.Range("D" & i).Value < 0 Then
ws.Range("E" & i).Value = 5100
End If
End If
Next i
It's run very slow as 120 seconds. Kind advise a suitable VBA macro to perform faster.
Regards
BINOD SHARMA