excel macro needed - find and move data

  • Thread starter Thread starter The Kid
  • Start date Start date
T

The Kid

I want a Marco that will search for numbers ending in CR see below and then
shift the amounts ending with CR from col J to Col K.

Thanking you in advacne for your assistance



J K

1,619.53
2,195.00
242,483.15
302.61
721,171.17CR
425,093.66CR
39,354.94
180.00CR
5,201.34CR
834.60CR
16,968.80
17,577.92
44,204.32
 
hi
something like this.....
Sub moveit()
Dim r As Range
Dim lr As Long

lr = Cells(Rows.Count, "J").End(xlUp).Row
Set r = Range("J2:J" & lr)

For Each cell In r
If Right(cell, 2) = "CR" Then
cell.Offset(0, 1) = cell.Value
cell.ClearContents
End If
Next cell

End Sub

regards
FSt1
 
Back
Top