ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum function based on format (https://www.excelbanter.com/excel-worksheet-functions/43919-sum-function-based-format.html)

JMS

Sum function based on format
 
I have a long column of numbers.
Some of the numbers are are bolded, and some are not.
I want to get a sum of only the bolded numbers.

Is there an easy way to do this whereby Excel will only add the bolded
numbers?


Richard Buttrey

On Mon, 5 Sep 2005 07:57:02 -0700, JMS
wrote:

I have a long column of numbers.
Some of the numbers are are bolded, and some are not.
I want to get a sum of only the bolded numbers.

Is there an easy way to do this whereby Excel will only add the bolded
numbers?


See my answer to the similar posting earlier, in the thread "calculate
numbers based on font colour' (or color if you're from across the pond
:-)

Change the line
If Myrange.Cells(y, 1).Font.ColorIndex = 3 Then

to

If Myrange.Cells(y, 1).Font.Bold = True Then


Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

Paul Sheppard


JMS Wrote:
I have a long column of numbers.
Some of the numbers are are bolded, and some are not.
I want to get a sum of only the bolded numbers.

Is there an easy way to do this whereby Excel will only add the bolded
numbers?


Hi JMS

Some useful info here ----------
http://www.cpearson.com/excel/colors.htm


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=401946



All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com