Hi Ikaabod
Sorry to bother you again but I was hoping for some guidance on the next bit
I now have a number of rows and in cell B2 I have the string 'LG' and in cell C2 I have 'Neg'. What I would like to do now is compare the two and then give me an output to another cell.
I think I need to use the StrComp function and I'm thinking along the lines of this
Private Sub cmdCreate_Click()
Dim strValue1 As String
Dim strValue2 As String
Dim Criteria1 = LG As String
Dim Criteria2 = HGI As String
Dim Criteria3 = HGII As String
Dim Criteria4 = AGUS As String
Cells(2, "B").value = strValue1
Cells(2, "C").value = strValue2
iComparisonValue = StrComp(strValue1, strValue2, vbTextCompare)
' I now need it to make the comparisons
Dim iRow As Integer
Dim iTotalRows As Integer
iRow = 0
iTotalRows = ActiveSheet.UsedRange.Rows.Count
Do
If ActiveCell.Offset(2, "B").Value IS "Neg" AND ActiveCell.Offset(2 , "C").Value Is Criteria1 OR Criteria2 OR Criteria3 OR Criteria4 Then ActiveCell.Offset(2, "D").Value = "FN"
iRow = iRow + 1
Loop Until iRow = iTotalRows
End Sub
I know this is wrong but hopefully you can see from it what I'm trying to do. I then need it to loop and go down all the rows.
Any help or pointers would as always be most appreciated.
regards
steve
Bookmarks