Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Sum Bold and Visible

How can I sum a range of only the bold and visible numbers?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Sum Bold and Visible

Write a custom VBA function that tests for bold and visible and sums up the
content of those.

HTH. Best wishs Harald

"John" wrote in message
...
How can I sum a range of only the bold and visible numbers?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Sum Bold and Visible

Public Function SumVisBold(rngSumRange As Range) As Single
Dim rngCell As Range
For Each rngCell In rngSumRange
If IsNumeric(rngCell.Value) Then
If rngCell.Font.Bold = True Then
If rngCell.Rows.Hidden = False Then
If rngCell.Columns.Hidden = False Then
SumVisBold = SumVisBold + rngCell.Value
End If
End If
End If
End If
Next rngCell
End Function

Note: you will have to force a re-calc


Gord Dibben MS Excel MVP



On Tue, 10 Feb 2009 11:25:46 -0800, "John" wrote:

How can I sum a range of only the bold and visible numbers?


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
Printing in excel always comes out in bold even tho bold not on Scarlett50 Excel Discussion (Misc queries) 2 March 26th 10 02:39 PM
Alphabetically list of last names: BOLD, not bold Lerner Excel Discussion (Misc queries) 16 March 1st 09 07:46 PM
Alphabetically list of names BOLD and NOT bold Lerner Excel Discussion (Misc queries) 13 March 1st 09 02:37 PM
conditional formating bold is true not bold false how victorio0704 Excel Programming 4 June 25th 08 04:29 PM
Join bold and non-bold text in one cell bkincaid Excel Discussion (Misc queries) 3 March 21st 06 12:58 AM


All times are GMT +1. The time now is 09:33 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"