Forum Discussion

PHILIP ROCHESTER's avatar
PHILIP ROCHESTER
Brass Contributor
Nov 11, 2018
Solved

COUNT CELLS THAT ARE NOT HYPERLINKED OR HAVE A CELL COLOR

Hi i have a worksheet in Excel where i need to count cells (with names, omitting blanks), that have not been hyperlinked (the hyperlinked cells are colored green) and transfer result to a list. I ne...
  • Jamil's avatar
    Nov 11, 2018

    See the attached example.

     

    You can get what you need, by using UDF and COUNTA function.

     

    I have put as an example in T2 this =COUNTA(B2:Q2)-HyperlinkFound(B2:Q2)

     

    and the UDF embedded in the workbook is this

    Public Function HyperlinkFound(Rng As Range)
        HyperlinkFound = Rng.Hyperlinks.Count
    End Function
    

Resources