change cellvalue based on value in adjacent cell
Another thing that may help, put this at the start of the macro:
application.Calculation = xlCalculationManual
and this at the end:
application.Calculation = xlCalculationAutomatic
"Sane" wrote:
In my account data i have amount in column h and Debit, Credit (DR/
CR) in next column. To modify the values in column h the code is
........
For Each c In Range("H2:h" & t)
If c.Offset(0, 1) = "DR" Then
c.Value = c
Else
c.Value = -c
End If
Next
........
This part of macro takes abnormally high time. Please suggest any
alternative to make this faster.
.
|