Condition based on format?

M

msherman83

The cells with the expenses I want to exclude are formatted in
different color. Is there any way to write a formula or macro so i
excludes based on the color of a cell?

Thanks
 
G

Gord Dibben

Would depend upon how they got colored.

If through Conditional Formatting, you could use the same condition(s) to
exclude.

If manually colored, you will need VBA code.

See Chip Pearson's site for working with colors.

http://www.cpearson.com/excel/colors.htm

Gord Dibben Excel MVP
 
D

Dave Peterson

You can use a userdefined function to return the value of the color (in a helper
cell??) and then use that in your other formulas:

Chip Pearson has some sample code at:
http://www.cpearson.com/excel/colors.htm

(if the color is set via Format|conditional formatting, this won't work)
 
Top