jeudi 22 mars 2018

find letter in column vba

I have if function that should check a few conditions in excel tab and if column B <> 0 and column C has "A" then it gives me "OK"

But it is not working. I tried to add .text, .value or whatever, still it doesnot see "A" in and gives me "Run-time error 424 Object required"

Could you please advise?

For iRow1 = LBound(varSheetA, 1) To UBound(varSheetA, 1)
    For iCol1 = LBound(varSheetA, 2) To UBound(varSheetA, 2)

        If varSheetB(iRow1, 2) <> 0 And varSheetB(iRow1, 3) = "A" Then
        MsgBox ("OK")

    End If
        Next iCol1
    Next iRow1

Aucun commentaire:

Enregistrer un commentaire