Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
timz
 
Posts: n/a
Default 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

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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.cpearson.com/excel/colors.htm

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

--
Regards,

Peo Sjoblom

(No private emails please)


"timz" wrote in message
...
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


  #3   Report Post  
PeterAtherton
 
Posts: n/a
Default



"timz" wrote:

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

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM
conditional formatting based on column snax500 Excel Discussion (Misc queries) 4 April 27th 05 06:13 PM
Calculate percentage based on cells with conditional formatting Cachod1 New Users to Excel 5 April 4th 05 02:11 PM
Conditional formatting based on if statement. kevin Excel Worksheet Functions 2 January 12th 05 03:07 AM
How to do a conditional formatting based on an adjacent cell Confused Excel Discussion (Misc queries) 2 January 10th 05 09:55 PM


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"