Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm trying to create a logical equation that will sum the values of cells
within a range only if the contents are bold. Is this possible? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub sumbold()
For Each c In Range("a2:a22") If c.Font.Bold = True Then ms = ms + c Next c MsgBox ms End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "oisinirish" wrote in message ... I'm trying to create a logical equation that will sum the values of cells within a range only if the contents are bold. Is this possible? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
U need a UDF for that,
Public Function SumBold(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 SumBold = SumBold + rngCell.Value End If End If Next rngCell End Function Place in a regular module on the worksheet your formula will be =SumBold(A1:A7") |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How did the values get to be bold... manually or via Conditional Formatting?
If Conditional Formatting, what formula was used to make them bold? -- Rick (MVP - Excel) "oisinirish" wrote in message ... I'm trying to create a logical equation that will sum the values of cells within a range only if the contents are bold. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Do you want to replace the contents of the destination cells?" | Excel Discussion (Misc queries) | |||
Adding the contents of "x" number of cells. | Excel Worksheet Functions | |||
Convert cell "contents" into a "comment" | Excel Discussion (Misc queries) | |||
how to increase size of "name box" and "contents of cell " displa. | New Users to Excel | |||
Where is the toolbar with the "bold type", "font type", options | New Users to Excel |