Below are steps on how to sum up cells based on background color using Function SUMIF and UDF (User Defined Function).
Expectation:
E2=B2+B5+B6; E3=B3+B8+B10; E4=B4+B6+B9
E2=B2+B5+B6; E3=B3+B8+B10; E4=B4+B6+B9
Step 1. Create User Defined Function (UDF) COLORINDEX
Step 2. On the worksheet, create another column and use the UDF COLORINDEX to get the Color Index number. In this case, cell C2.
Copy for the next cell C3 to C10 and then we can use Function SUMIF for cell F2, F3, and F4 as below:
No comments:
Post a Comment