## Is there a way to SUM based on formatting of a number?

### Is there a way to SUM based on formatting of a number?

I have a column of \$ formatted numbers. Some of them are bold and the others
are not. I would like to Sum the column based on whether the bold formatting
is applied or not. Is there a way to do this? (doesn't appear to be)

If there isn't, then let me explain what I am looking for ultimately. I want
to have two totals for this column of \$. One that includes everything and one
that includes everything that isn't "marked". Bolding a cell is a really easy
and visual way of marking a cell. Is there some other way I could mark a cell
and is visible and I can conditionally sum the values?

Thanks,
Tim

### Is there a way to SUM based on formatting of a number?

You could sum based on formatting if you use VBA, Chip Pearson has some VBA
functions that will sum based on cell color here

http://www.yqcomputer.com/

If you search Google you should be able to find some VBA solutions to "sum
bold fonts"

--
Regards,

Peo Sjoblom

### Is there a way to SUM based on formatting of a number?

A simple function could be

Function BoldSum(rng)
Dim c
For Each c In rng
If c.Font.Bold Then
BoldSum = BoldSum + c.Value
End If
Next

End Function

Copy function into VB Module and use within the book.

Peter Atherton