You can go with PaddyD's approach, or you could use a UDF like
Code:
Function bjyes(Rng As Range, Clr As Range) As Double
Dim Cl As Range
For Each Cl In Rng
If Cl.Interior.Color = Clr.Interior.Color Then
bjyes = bjyes + Cl.Value
End If
Next Cl
End Function
| A | B | C | D |
---|
1 | Ward | Altitude | | |
2 | Blackwater and Hawley | 65 | | 392 |
3 | Cove and Southwood | 64 | | |
4 | Fernhill | 62 | | |
5 | Knellwood | 74 | | |
6 | Manor Park | 101 | | |
7 | North Town | 71 | | |
8 | North Town | 93 | | |
9 | Rowhill | 98 | | |
10 | St John's | 71 | | |
11 | St Mark's | 79 | | |
12 | St Mark's | 70 | | |
13 | Wellington | 98 | | |
14 | Wellington | 89 | | |
15 | West Heath | 61 | | |
16 | Aldridge Central and South | 162 | | |
17 | Aldridge Central and South | 161 | | |
18 | Aldridge Central and South | 165 | | |
19 | Brownhills | 156 | | |
20 | Brownhills | 153 | | |
<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1
Worksheet Formulas
Cell | Formula |
---|
D2 | =bjyes(B2:B20,C2) |
---|
<thead>
</thead><tbody>
</tbody> |
<tbody>
</tbody>
Fluff and PaddyD,
thank you for your suggestions. 'Preciate your taking the time to respond. Both appear to be viable possibilities. Whatever's simplest and works is my motto. Thanks again.
--- bjyes1