我下表在Excel中:Excel的總和範圍匹配查找
__|______A_______|_________B___________|____C____|
1 |Client | Description | Amount |
2 |Client One | Water Services | 50 |
3 |Client One | Installation Fees | 120 |
4 |Client One | Telephone Services | 130 |
5 |Client Two | Food Services | 20 |
6 |Client Two | Pump Installation | 40 |
7 |Client Two | Door Installation | 100 |
8 |Client Three | Telephone Services | 98 |
9 |Client Three | Gas Services | 34 |
10|Client Three | Installation Fees | 46 |
我需要一個公式來計算的第二個工作表爲每個客戶端,安裝總量爲每一個客戶服務的總金額。例如,它應該檢查是否說明包含在B列文本「服務」,再返回總量爲客戶如下:
__|____A________|______B_________|______C_______|
1 |Client | Description | Total Amount |
2 |Client One | Services | 180 |
3 |Client One | Installation | 120 |
4 |Client Two | Services | 20 |
5 |Client Two | Installation | 140 |
6 |Client Three | Services | 132 |
7 |Client Three | Installation | 46 |
我曾嘗試下面的公式,但我只能夠回報在片材1用於在客戶端和描述(列B)的第一個值必須包含確切的文本,要麼是「服務」或「安裝」:
=INDEX(Sheet1!C2:C10,MATCH(A2&B2,Sheet1!A2:A10&Sheet1!B2:B10,0))
- 我需要能夠得到總值而不是第一個值。
- 我還需要搜索描述是否包含「服務」或「安裝」,然後返回金額。
此解決方案對我來說最適合。謝謝。 – Boy12343