How can I sum only amounts that are in BOLD format within a column

W

Wanda

Hi!
I need to get a total from a worksheet that has hundreds of amounts in it.
However, I only need the total of the amounts that were marked with have BOLD
font. Please help me I don't have much experience with EXCEL.

Thank you very much!

W a n d a
 
D

Don Guillett

try this for column D

Sub sumbold()
x = Cells(Rows.Count, "d").End(xlUp).Row
For Each c In Range(Cells(2, 4), Cells(x, 4))
If c.Font.Bold Then mysum = mysum + c
Next
MsgBox mysum
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top