Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Functions in worksheets

Does anyone know if it is possible to add numbers if they have a certain
format. For example, I have a column of numbers with some in bold format. I
only want to add the ones that are bold. Can that be done? If so, how?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Functions in worksheets

Enter and use this UDF:

Function countbold(r As Range) As Double
countbold = 0
For Each rr In r
If rr.Font.FontStyle = "Bold" Then
countbold = countbold + rr.Value
End If
Next
End Function


just be careful of volitility issues if you change fonts afterwards.
--
Gary's Student
gsnu200704


"scampbell" wrote:

Does anyone know if it is possible to add numbers if they have a certain
format. For example, I have a column of numbers with some in bold format. I
only want to add the ones that are bold. Can that be done? If so, how?

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
Unhide Worksheets Wanna Learn Excel Discussion (Misc queries) 0 November 30th 06 04:38 PM
Unhide Worksheets Randy L Excel Discussion (Misc queries) 0 November 30th 06 03:58 PM
Database functions should use criteria in formula, as 1-2-3 does 123user Excel Worksheet Functions 8 September 29th 05 08:57 PM
Visible rows and functions that work tracy Excel Worksheet Functions 2 August 19th 05 05:25 AM
Functions across multiple worksheets starlight Excel Worksheet Functions 0 August 10th 05 05:10 PM


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

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

About Us

"It's about Microsoft Excel"