Hello,
would you please improve the macro? The issue arises when I have numbers in both columns (A and B) in Debit and Credit.
For example In Debit 1,000 and in Credit 1,200. So, in column A should be (200) after running a Macro.
Sub MoveCredits_v3()
With Range("A2:A" & Range("B" & Rows.Count).End(xlUp).Row)
.Value = Evaluate(Replace(Replace("if(#="""","""",if(#=0,-^,#))", "#", .Address), "^", .Offset(, 1).Address))
.Offset(, 1).Clear '<- Optional to clear Credit column
End With
End Sub
would you please improve the macro? The issue arises when I have numbers in both columns (A and B) in Debit and Credit.
For example In Debit 1,000 and in Credit 1,200. So, in column A should be (200) after running a Macro.
Sub MoveCredits_v3()
With Range("A2:A" & Range("B" & Rows.Count).End(xlUp).Row)
.Value = Evaluate(Replace(Replace("if(#="""","""",if(#=0,-^,#))", "#", .Address), "^", .Offset(, 1).Address))
.Offset(, 1).Clear '<- Optional to clear Credit column
End With
End Sub