[VBA] Victor



  1. E1的Formula是 >>>
  2. =COUNTIF($A$1:$A$1000,D1)-colorFunction($D$4,$A$1:$A$1000,D1)


  3. E2的Formula是 >>>
  4. =COUNTIF($A$1:$A$1000,D2)-colorFunction($D$4,$A$1:$A$1000,D2)


  5. VBA Code
Function colorFunction(rColor As Range, rRange As Range, myItem As Range) As Long

'Updateby Extendoffice
    Dim rCell As Range
    Dim lCol As Long
    Dim vResult As Double
    lCol = rColor.Interior.ColorIndex
    vResult = 0

    For Each rCell In rRange
        If rCell.Interior.ColorIndex = lCol And rCell.Value = myItem.Value Then
            vResult = vResult + 1
        End If
    Next rCell
    colorFunction = vResult
End Function
            
        
          



Source: ---


Disclaimer: The information in this webpage is shared by anonymous users from external online sources. We cannot guarantee its accuracy or truthfulness. Users should exercise caution and verify information independently.


© 2023 maginokarp.com