Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Can I add values of a column that are only in bold format?

Is there a way to add the values of a column, adding just the numbers that
are in bold format?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Can I add values of a column that are only in bold format?

Give this a try.

Sub SumTheBold()
Dim Mud As Range
Dim cell As Range
Dim i As Integer

Set Mud = Range("A1:A5")

For Each cell In Mud
If cell.Font.Bold = True Then
i = cell.Value + i
End If
Next

MsgBox i
End Sub

HTH
Regards,
Howard


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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Can I add values of a column that are only in bold format?

On Mon, 21 Sep 2009 12:13:56 -0700, "L. Howard Kittle"
wrote:

Give this a try.

Sub SumTheBold()
Dim Mud As Range
Dim cell As Range
Dim i As Integer

Set Mud = Range("A1:A5")

For Each cell In Mud
If cell.Font.Bold = True Then
i = cell.Value + i
End If
Next

MsgBox i
End Sub

HTH
Regards,
Howard


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




Get in mah Hard Drive!
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
Bold format. Balaji Excel Discussion (Misc queries) 2 November 2nd 07 10:22 PM
Format Help BOLD year in a specific vehicle application Column mobile electronics installer Excel Worksheet Functions 1 February 28th 07 08:48 AM
How do you sum just values that are bold in a list of values? Dominic Excel Worksheet Functions 3 September 9th 05 06:37 AM
How to bold daily max values Ginger Excel Discussion (Misc queries) 1 May 18th 05 06:28 PM
How can I sum only amounts that are in BOLD format within a column Wanda New Users to Excel 1 March 11th 05 07:32 PM


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

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"