#  Other Applications & Softwares  > Outlook Formatting & Functions >  > [SOLVED] Sum Functions/formula: selection for addition base off of colours

## Eline Verhoeven

Hi all,

I'd like to pose a question regarding a SUM function. (please refer to the Excel file attached)

Here, the SUM on the right is the total sum of all the values placed in a row to the left of it. In this row, there are surface areas of two either existing or new doors. The new doors are recorded into excel in the green font. The existing doors are recorded in excel with a black font. I need two different SUM columns: 1. total sum of all the existing door areas and 2. sum of all the new door surface areas.

Ideally I would use one formula for all of the total sums in the columns to the right. The formula would need to be able to distinguish whether or not it will add a value based off of value's text colour. Is this possible? (for example deriving from complex IF functions, and so on.)

Thanks for your time!

Best,

Eline

----------


## Glenn Kennedy

Hi, please take a moment to read the yellow banner at the top of the page, and then attach a sample sheet, complete with expected answer... not a blurry picture of one!!

----------


## Eline Verhoeven

Hi Glenn,

Thanks for your message. I've uploaded a simplified example file. Hopefully this provides some clarity.

Thanks!

----------


## Glenn Kennedy

A bit of a guess, as you didn't include your expected answers!!

=SUMIF($D$5:$AH$5,"*New*",$D7:$AH7)

See sheet for context.  You'll need ; instead of ,

----------


## Eline Verhoeven

Thanks Glenn - this formula works perfectly.

----------


## Glenn Kennedy

You're welcome.

----------

