[問題] 自訂函數計算文字顏色
軟體: Excel
版本:365
想要自訂一個函數來計算選取範圍中含目標顏色的儲存格數量
Function FontColorCount(rng_c As Range, cell_a As Range)
Dim qty As Integer
Dim cel As Range
qty = 0
For Each cel In rng_c
If cel.Font.ColorIndex = cell_a.Font.ColorIndex Then
qty= qty + 1
FontColorCount = qty
End If
Next cel
End Function
但是運行後好像發現公式只能計算出原有儲存格文字設定的顏色,若是用條件化格式改變字
https://m.imgur.com/a/KPK6Thc
希望版上各位前輩能指點一下怎麼調整語法
十分感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.137.112.145
※ 文章網址: https://www.ptt.cc/bbs/Office/M.1552626343.A.FD4.html
→
03/15 14:42,
7年前
, 1F
03/15 14:42, 1F
※ 編輯: al53796 (114.137.112.145), 03/15/2019 15:00:15
→
03/15 15:19,
7年前
, 2F
03/15 15:19, 2F
→
03/15 15:19,
7年前
, 3F
03/15 15:19, 3F
→
03/15 15:28,
7年前
, 4F
03/15 15:28, 4F
→
03/15 15:29,
7年前
, 5F
03/15 15:29, 5F
→
03/15 15:38,
7年前
, 6F
03/15 15:38, 6F
Office 近期熱門文章
PTT數位生活區 即時熱門文章