返回列表 上一主題 發帖

[發問] Excel 判斷字體顏色共有出現幾次

[發問] Excel 判斷字體顏色共有出現幾次

Dear all,
我共有3種顏色(紅、綠、黑),我想要計算當儲存格內的英文D(紅、綠、黑)、L(紅、綠、黑)其顏色共出現幾次
有哪些公式是可以找的?
感謝大家!



字體顏色區分.rar (8.14 KB)
Just do it.

Function GetFontCount(xArea As Range, xA As Range)
Dim xR As Range
For Each xR In xArea
    If xR = xA And xR.Font.ColorIndex = xA.Font.ColorIndex Then
       GetFontCount = GetFontCount + 1
    End If
Next
End Function

Xl0000063.rar (11.26 KB)

TOP

google"EXCEL迷"  blog  或google網址:https://hcm19522.blogspot.com/

TOP

回復 2# 准提部林

Dear 准提部林,
感謝您的幫忙,阿里嘎斗
Just do it.

TOP

回復 3# hcm19522

Dear  hcm19522,

感謝您所提供的另一種方式,阿里嘎斗
Just do it.

TOP

        靜思自在 : 人要自愛,才能愛普天下的人。
返回列表 上一主題