Calculations based on cell color

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
How do I perform mathematical computation based on the cell color??? The problem lies in the fact that I can color a cell based on a certain value or computation but how do I perform a computation based on color or format of a cell. For example if the cell color is green in a certain range then the cell values should be added. If any of you could be help to me it would be great.
 
Sorry, Aladin...

Nevermind, I fixed the problem...I'm an idiot. I had one formula returning an #n/a in that column...that's why it wasn't working.

Problem solved. Thanks again.

Until next time.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
On 2002-11-20 16:59, wolverine12 wrote:
Thanks for hanging in there...

Ok, I'll give all the details here:

=INDEX('Sheet Name'!P:P,MATCH($A311,'Sheet Name'!$B:$B,0),0)
The returned result is a dollar value and the cell(s)has a coloured background.

Later I use:
=SUMPRODUCT((ExtCell("backgroundcolor",Range,1)=Color Value)*(Range)
I get #n/a returned unless I replace the formula (first one above) with the actual values.

I hope that makes it more clear.

The exhibit below shows that formulas in the range with colored cells do not have any adverse effect...
HGroveExtCell.xls
ABCDE
1
2a93
3b1233
440
512
6
7
8LookupTable
9a9
10b12
11c21
12
Sheet2


=SUMPRODUCT((ExtCell("backgroundcolor",Range,1)=Color Value)*(Range))

where Color value must be an integer like 3 (for red) or a cell ref housing an integer. Otherwise, I don't see why you'd have problems with it.
 
Upvote 0
On 2002-11-20 17:12, wolverine12 wrote:
Sorry, Aladin...

Nevermind, I fixed the problem...I'm an idiot. I had one formula returning an #n/a in that column...that's why it wasn't working.

Problem solved. Thanks again.

Until next time.

Yes, that's another reason...
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top