Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
SRN SRN is offline
external usenet poster
 
Posts: 6
Default SUM of column based on format criteria

I need to sum a column which has a series of dollar amounts, some the same,
but only include numbers once they have been made bold. eg

23.50
67.80 (Bold format)
99.45
88.23
23.50(Bold format)
22.45
88.23
19.00

In the above example the sum would be only of numbers with bold format. What
would e the formula to do that

Thanks

SRN

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default SUM of column based on format criteria

Hi,

there is no inbuilt finction for SumBold you have to write one so try this

Alt+F11 to open VB editor. Right click 'This Workbook' and insert module and
paste the code below in

call with =SumBold(A1:A20)

Note that simply bolding a cell won't cause the worksheet to recalculate so
refresh the formula with F9 when bolding a cell

Function SumBold(rng As Range) As Variant
Application.Volatile
For Each c In rng
If IsNumeric(c) And c.Font.Bold Then
SumBold = SumBold + c.Value
End If
Next
End Function

Mike

"SRN" wrote:

I need to sum a column which has a series of dollar amounts, some the same,
but only include numbers once they have been made bold. eg

23.50
67.80 (Bold format)
99.45
88.23
23.50(Bold format)
22.45
88.23
19.00

In the above example the sum would be only of numbers with bold format. What
would e the formula to do that

Thanks

SRN

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
Sum specific column rows based on 2 different column criteria Jack Excel Worksheet Functions 3 October 9th 08 05:03 PM
Counting items in one column based on criteria in another column luttona Excel Worksheet Functions 3 June 13th 08 06:00 PM
filter or format based on criteria in more than one column tabbicat Excel Worksheet Functions 4 March 13th 07 02:24 PM
calculate average in a column based on criteria in another column sharon t Excel Discussion (Misc queries) 2 May 12th 06 06:07 PM
move contents of column C based on criteria related to column A Debra Excel Discussion (Misc queries) 2 December 27th 05 10:25 PM


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