Sub Move_Cr_To_Dbt()
Dim lr As Long
lr = Range("B:C").Find("*", , xlValues, xlPart, xlByRows, xlPrevious).Row
With Range("B2:B" & lr)
.SpecialCells(4).Formula = "=RC[+1]*-1"
.Value = .Value
.Offset(, 1).ClearContents
End With
End Sub
Column B is the Debit Column while Column C is the Credit Column
Change references in code as required.
Code:Sub Move_Cr_To_Dbt() Dim lr As Long lr = Range("B:C").Find("*", , xlValues, xlPart, xlByRows, xlPrevious).Row With Range("B2:B" & lr) .SpecialCells(4).Formula = "=RC[+1]*-1" .Value = .Value .Offset(, 1).ClearContents End With End Sub
[FONT=Verdana][FONT=Verdana]Sub CopyCreditToDebt()
Dim lastRow As Long
'Find the last row in col B that has a value.
lastRow = Sheets("Sheet1").Range("B:B").SpecialCells(xlCellTypeLastCell).Row
Sheets("Sheet1").Range("C1:C" & lastRow).Value = "=IF(B1<0,B1,"""")"
End Sub
[/FONT][B][I][U][SUB][SUP]<strike>
</strike>[/SUP][/SUB][/U][/I][/B][/FONT]
.SpecialCells(4).Formula = "=RC[+1]*-1"
.SpecialCells(4).Formula = "=""(""&RC[1]&"")"""