Dear friends,
Is there any formula or VBA Code that allows me to subtotal a group of cells based on their cell background color but as enlisted in the "Desired formula" column as follows:
D4 Subtotals D5:D8
D5 Subtotals D6
D7 Subtotals D8
D6 And D8 Are data captured manually
Thanks a lot i hope this is easy to understand.
Thanks in advance.
<tbody>
</tbody>
Is there any formula or VBA Code that allows me to subtotal a group of cells based on their cell background color but as enlisted in the "Desired formula" column as follows:
D4 Subtotals D5:D8
D5 Subtotals D6
D7 Subtotals D8
D6 And D8 Are data captured manually
Thanks a lot i hope this is easy to understand.
Thanks in advance.
Cell | C | D | E | |||
Reference | Code | Amount | Formula (Using Cell Reference) | Description | Cell Color | Desired Formula |
4 | 1 | 20.00 | =SUBTOTAL(9,D5:D8) | Second Subtotal (Range: 1:1 to 1.2.1) | Cell Color: Yellow | Subtotal til the next yellow cell |
5 | 1.1 | 10.00 | =SUBTOTAL(9,D6) | First Subtotal (Range 1.1.1) | Cell Color: Green | Subtotal til the next green cell |
6 | 1.1.1 | 10.00 | DATA INPUT | Data Captured Manually | Cell Color: No Color | No formula |
7 | 1.2 | 10.00 | =SUBTOTAL(9,D8) | First Subtotal (Range 1.2.1) | Cell Color: Green | Subtotal til the next green cell |
8 | 1.2.1 | 10.00 | DATA INPUT | Data Captured Manually | Cell Color: No Color | No formula |
9 | 2 | 20.00 | =SUBTOTAL(9,D10:D13) | Second Subtotal (Range: 2.1 to 2.2.1) | Cell Color: Yellow | Subtotal till the next yellow cell |
10 | 2.1 | 10.00 | =SUBTOTAL(9,D11) | First Subtotal (Range 2.1.1) | Cell Color: Green | Subtotal til the next green cell |
11 | 2.1.1 | 10.00 | DATA INPUT | Data Captured Manually | Cell Color: No Color | No formula |
12 | 2.2 | 10.00 | =SUBTOTAL(9,D13) | First Subtotal (Range 2.2.1) | Cell Color: Green | Subtotal til the next green cell |
13 | 2.2.1 | 10.00 | DATA INPUT | Data Captured Manually | Cell Color: No Color | No formula |
Grand Total | 40.00 |
<tbody>
</tbody>