Hi Ikaabod
I've been playing around and so far this does pretty much what I want it to do
Sub Test()
Dim strValue1 As String
Dim strValue2 As String
Dim Criteria1 As String
Dim Criteria2 As String
Dim Criteria3 As String
Dim Criteria4 As String
Dim Comparison As String
Criteria1 = "NEG"
Criteria2 = "LG"
Criteria3 = "HG I"
Criteria4 = "HG II"
Criteria5 = "AGUS"
Range("A1").Select
Dim iRow As Integer
Dim iTotalRows As Integer
iRow = 0
iTotalRows = ActiveSheet.UsedRange.Rows.Count
Do
strValue1 = ActiveCell.Offset(iRow, 0).Value
strValue2 = ActiveCell.Offset(iRow, 1).Value
If strValue1 = Criteria2 Or strValue1 = Criteria3 Or strValue1 = Criteria4 Or strValue1 = Criteria5 And strValue2 = Criteria1 Then ActiveCell.Offset(iRow, 3).Value = "FP"
If strValue1 = Criteria1 And strValue2 = Criteria2 Or strValue2 = Criteria3 Or strValue2 = Criteria4 Or strValue2 = Criteria5 Then ActiveCell.Offset(iRow, 3).Value = "FN"
If strValue1 = Criteria1 And strValue2 = Criteria1 Then ActiveCell.Offset(iRow, 3).Value = "AGREE"
If strValue1 = Criteria2 And strValue2 = Criteria2 Then ActiveCell.Offset(iRow, 3).Value = "AGREE"
If strValue1 = Criteria3 And strValue2 = Criteria3 Then ActiveCell.Offset(iRow, 3).Value = "AGREE"
If strValue1 = Criteria4 And strValue2 = Criteria4 Then ActiveCell.Offset(iRow, 3).Value = "AGREE"
If strValue1 = Criteria5 And strValue2 = Criteria5 Then ActiveCell.Offset(iRow, 3).Value = "AGREE"
iRow = iRow + 1
Loop Until iRow = iTotalRows
End Sub
I know there are a lot of 'If' statements and I'll have a go and try and tidy them up a bit but I'm not too concerned as it does work.
I couldnt have done it without your help though - many thanks
Now all I have to do is get it to add up all the 'FN' ' s and the 'FP''s and 'AGREE''s and It'll be all done
Again thanks for your time and efforts.
regards
steve
Bookmarks