edluver216
New Member
- Joined
- Jun 19, 2008
- Messages
- 7
Code:
Sub ReCommentOnUs()
Dim OnUs As Range
Dim ActiveList As Range, Active As Range
Set OnUs = Worksheets("Break-Down").Columns(5)
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = True
End With
'Fill ActiveList Array
With Sheets("Full Report")
Set ActiveList = Range("C2:C" & Cells(Rows.Count, "C").End(xlUp).Row)
End With
For Each Active In ActiveList
If Application.CountIf(OnUs, Active) > 0 Then
If Active.Offset(0, -2).Value = Null Then
Active.Offset(0, -2).Value = "On Us Check"
ElseIf Active.Offset(0, -2).Value <> Null Then
Active.Offset(0, -2).Select
Selection.Cut
Active.Offset(0, 73).Select
ActiveSheet.Paste
Active.Offset(0, -2).Select
Selection.Value = "On Us Check"
End If
End If
Next
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = False
End With
End Sub
The object of this code is to compare one column of numbers to another, if there is a match, the cell in the A column is tested. If it returns NULL, the comments "On Us Check" is to be added, if the cell already contains a value, that value will be cut and moved to column BX of the same row and then "On Us Check" is added to the cell in Column A. this isnt working at all, can anyone help?