Results 1 to 6 of 6

Thread: Text Comparison between a column and a table is not working.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    you can use "countif".


    For iDF = 2 To DFxWSx04.Cells(Rows.Count, 1).End(xlUp).Row    DFxWSxLR = DFxWSx01.Cells(Rows.Count, 2).End(xlUp).Row + 1
        For Each iBAI In DFxWSx03.Range("BAI")
            If DFxWSx04.Cells(iDF, 3).Value = iBAI.Value Then
                If WorksheetFunction.CountIf(DFxWSx03.Range("Exception"), DFxWSx04.Cells(iDF, 6)) = 0 Then
                    DFxWSx01.Cells(DFxWSxLR, 2) = DFxWSx04.Cells(iDF, 1)
                    DFxWSx01.Cells(DFxWSxLR, 1) = DFxWSx04.Cells(iDF, 2)
                    DFxWSx01.Cells(DFxWSxLR, 3) = DFxWSx04.Cells(iDF, 6)
                    DFxWSx01.Cells(DFxWSxLR, 5) = DFxWSx04.Cells(iDF, 4)
                End If
            End If
        Next iBAI
    Next iDF
    Last edited by mana; 09-24-2016 at 09:46 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •