Your text and your macro seem to contradict one another... but let's see
if I interpretted correctly. Tell me how this goes for you.
Private Sub cmdCreate_Click()
Dim strValue1 As String
Dim strValue2 As String
Dim Criteria1 As String
Dim Criteria2 As String
Dim Criteria3 As String
Dim Criteria4 As String
Criteria1 = "LG"
Criteria2 = "HGI"
Criteria3 = "HGII"
Criteria4 = "AGUS"
Dim iRow As Integer
Dim iTotalRows As Integer
iRow = 0
iTotalRows = ActiveSheet.UsedRange.Rows.Count
Range("A2").Select
Do
strValue1 = ActiveCell.Offset(iRow, 1).Value
strValue2 = ActiveCell.Offset(iRow, 2).Value
If (strValue1 = Criteria1 And UCase(strValue2) = UCase("Neg")) Or
(strValue1 = Criteria2 And UCase(strValue2) = UCase("Neg")) Or
(strValue1 = Criteria3 And UCase(strValue2) = UCase("Neg")) Or
(strValue1 = Criteria4 And UCase(strValue2) = UCase("Neg")) Then
ActiveCell.Offset(iRow, 3).Value = "FN"
Debug.Print ActiveCell.Offset(iRow, 1).Address
iRow = iRow + 1
Loop Until iRow = iTotalRows
End Sub
Best regards,
Ikaabod
--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile:
http://www.excelforum.com/member.php...o&userid=33371
View this thread:
http://www.excelforum.com/showthread...hreadid=541209