
(圖片來源)
我們在 Google Sheet 中使用彩色單元格是常見的任務之一,偶爾也會需要計算具有相同格式的單元格,如果你正在做這件事,你會注意到 Google Sheet 缺少統計顏色相關的公式。而 Power Tools 外掛添加了自定義函數,它在應用所有基本操作時會考慮單元格的字體和背景顏色。
一、安裝 Power Tool 外掛
![Image [4].png Image [4].png](https://pimg.1px.tw/shian420/1581860040-2511647628.png)
![Image [5].png Image [5].png](https://pimg.1px.tw/shian420/1581860040-1986814665.png)
二、使用 Power Tool
打開外掛程式選擇 Power Tools 並按下 Start。
![Image [6].png Image [6].png](https://pimg.1px.tw/shian420/1581860074-815093806.png)
這套外掛有許多功能,有興趣的人可以自己玩玩看,這邊目前只會提到 Funtion by color。
![Image [7].png Image [7].png](https://pimg.1px.tw/shian420/1581860120-636498415.png)
打開 Function by color 的視窗後,需要輸入以下資料,輸入完畢後按下 insert function 就可以了!
- Source range: 來源範圍
- Pattern cell: 欄位顏色
- Use function: 使用的功能
- Calculate in: 處理方式
- Paste results to: 結果位置
![Image [8].png Image [8].png](https://pimg.1px.tw/shian420/1581860141-4067235632.png)
若你點擊結果欄位可以看到詳細的公式,如果知道色票值可以直接輸入公式就好,不需要再經過上面的介面操作。valueByColor 一共有三個參數:
第一個 : 背景顏色
第二個 : 文字顏色,如果不需要就空字串就好
第三個 : 範圍
![Image [9].png Image [9].png](https://pimg.1px.tw/shian420/1581860168-3975304602.png)
參考資料:
How to count cells by color in Google Sheets
文章標籤
