# sum by cell color but cannot identify the cell range

#### isay

##### New Member
Hello there!

I have 5 set of data in excel with the same color identification. I want to sum the value per color in each set of data.

I tried to do some research but the code specify the range of the cell where to sum. With my case, I cannot identify what range of the cell. My program will just fill on the worksheet all the available data that can be retrieve from my source. So I dont know what particular range it will fill.

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

with the code on how to identify the range of the cell according to its cell color per column and row.

"...With my case, I cannot identify what range of the cell..."

Makes the task a little difficult!

As well as the general description, post back with a detailed example of what you're trying to do etc.

Book1.xls
ABCDEFG
4AccountTotal
5A420722\$ 2,736,177.83\$ 63,637.66\$ 2,799,815.49Sum of Blue in D colSum of Blue in E Col
6420723\$ 131,839.13\$ 4,222.34\$ 136,061.47so on..
7420724\$ 59,691,864.64\$ 3,504,745.22\$ 63,196,609.86
8440010\$ -\$ (2,853,793.50)\$ (2,853,793.50)
9440017\$ (33,288,119.24)\$ -\$ (33,288,119.24)
10441110\$ (1,742.29)\$ 938.81\$ (803.48)
11441120\$ (70.72)\$ 11.22\$ (59.50)
12448920\$ 7,202.78\$ -\$ 7,202.78
13461210\$ 492,882.60\$ 7,242.65\$ 500,125.25
14758143\$ 2,110,043.85\$ 44,386.34\$ 2,154,430.19
15758153\$ 461,875.15\$ 4,500.00\$ 466,375.15
16
17Total
18421101\$ (2,690,235.81)\$ -\$ (2,690,235.81)
19421102\$ 1,691,853.64\$ -\$ 1,691,853.64
20421103\$ 475,364.14\$ -\$ 475,364.14
21421104\$ 2,719.00\$ -\$ 2,719.00
22421108\$ 35,934.26\$ -\$ 35,934.26
23421111\$ (10,090,513.90)\$ -\$ (10,090,513.90)
24421112\$ 3,252,410.63\$ -\$ 3,252,410.63
25421113\$ 2,904,222.03\$ -\$ 2,904,222.03
26440017\$ (5,503,508.15)\$ -\$ (5,503,508.15)
27441330\$ (10,446,053.95)\$ -\$ (10,446,053.95)
28758041\$ 720,305.30\$ -\$ 720,305.30
29758042\$ 532,855.57\$ -\$ 532,855.57
Sheet1

Hi, see my sample above msg.

I have that format in my worksheet. When I run my program, those information from ColB to ColE are inputted in my worksheet but not all of the accounts are always available from my source file. That is why, in ColF and ColG, I cannot identify the range of the colors that I want to sum because the data is upon its availability. I need your expertise for the code on this one.

Please post back if I didn't make myself clear again.

thanks so much..

Replies
3
Views
278
Replies
15
Views
546
Replies
6
Views
265
Replies
6
Views
545
Replies
5
Views
420

1,203,513
Messages
6,055,831
Members
444,828
Latest member
StaffordStag

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back