View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Can I add values of a column that are only in bold format?

Hi,

You would need a UDF for that. Alt+F11 to open Vb editor. Right click on
'This Workbook' and insert module and paste the code below in

call with

=sumbold(a1:a10)


Function SumBold(Rng As Range) As Double
Dim c As Range, TempSum As Double
Application.Volatile
TempSum = 0
On Error Resume Next
For Each c In Rng.Cells
If c.Font.Bold = True Then
TempSum = TempSum + c.Value

End If
Next c
On Error GoTo 0
Set c = Nothing
SumBold = TempSum
End Function

Mike

"Bytemylobster" wrote:

Is there a way to add the values of a column, adding just the numbers that
are in bold format?