請問要判斷A1到A11的儲存格是否有填滿顏色,假若有填滿顏色就不計算,只計算沒有填滿顏色的總和,要怎麼寫在A13裡,用一格來完成這樣的計算總和呢?定義名稱裡面我已經寫好顏色 =GET.CELL(63,A1) ,這樣一次只能判斷一個儲存格是否有填滿,但我想寫在同一個儲存格來完成這樣的計算。
Function Sum_NO_Color(All_Data As Range) Application.Volatile Dim temp As Range For Each temp In All_Data If temp.Interior.ColorIndex = -4142 Then Sum_NO_Color = Sum_NO_Color + temp.Value End If Next End Function