G
Guest
Hello NG,
I'm trying to compare two columns of numbers to see if there are new entries
in the list.
I have a column of numbers (always in E) and I have another column of
numbers (always in J).
The numbers in column E are the numbers for invoices I've already checked,
the numbers in column J are for the numbers of invoices that are both new and
checked.
How can I compare the 2 columns and change the font color to red for the new
invoice numbers (invoices not checked) .
I have gotten this far and I don't know how to continue
Any help would be greatly appreciated
James
=============================================
Sub Check_Invoice_Number()
Sheets("Sheet1").Activate
Dim i As Integer
Dim RowCount As Integer
Dim CellVaLue
Application.ScreenUpdating = False
'get the number of rows from the first column for the loop (column E)
Range("E65536").Select
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
RowCount = Selection.Rows.Count
'define a starting place
Range("E1").Select
'Begining of
Loop----------------------------------------------------------------------------
'Loop through each of the rows of the spreadsheet
For i = 1 To RowCount
' look in column E, which is the 1st column for a duplicate
If (Cells(i + 1).Value) = (testvalue for column J) Then
CellVaLue = ActiveCell.Value
MsgBox CellVaLue
Else
CellVaLue = ActiveCell.Value
MsgBox CellVaLue
End If
Next
End Sub
--
I'm trying to compare two columns of numbers to see if there are new entries
in the list.
I have a column of numbers (always in E) and I have another column of
numbers (always in J).
The numbers in column E are the numbers for invoices I've already checked,
the numbers in column J are for the numbers of invoices that are both new and
checked.
How can I compare the 2 columns and change the font color to red for the new
invoice numbers (invoices not checked) .
I have gotten this far and I don't know how to continue
Any help would be greatly appreciated
James
=============================================
Sub Check_Invoice_Number()
Sheets("Sheet1").Activate
Dim i As Integer
Dim RowCount As Integer
Dim CellVaLue
Application.ScreenUpdating = False
'get the number of rows from the first column for the loop (column E)
Range("E65536").Select
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
RowCount = Selection.Rows.Count
'define a starting place
Range("E1").Select
'Begining of
Loop----------------------------------------------------------------------------
'Loop through each of the rows of the spreadsheet
For i = 1 To RowCount
' look in column E, which is the 1st column for a duplicate
If (Cells(i + 1).Value) = (testvalue for column J) Then
CellVaLue = ActiveCell.Value
MsgBox CellVaLue
Else
CellVaLue = ActiveCell.Value
MsgBox CellVaLue
End If
Next
End Sub
--