|
|
|
#1
|
|||
|
|||
|
Excel question for the experts
Hi there!
Does anyone here know if it's possible to do the following in Excel? I have a column (or row) of numbers, some of which are formatted in bold. I want to count the number of cells in that row (or column) that are so formatted. (As opposed to the sum of those numbers). In other words, I want a formula that returns: "how many cells within this range are formatted in bold?" Thanks, -P |
| Advertisements | |
|
|
|
|
#2
|
|||
|
|||
|
I think it depends on what version of Excel you are using. On the computer that I'm on at present is Excel 2003, and I think you can't do that sort of thing. However, I believe that you might be able to do in in Excel 2007: I've been told that you can do tests of cell format with that version.
|
|
#3
|
|||
|
|||
|
I'm using the 2007 version.
|
|
#4
|
|||
|
|||
|
Quote:
Giles might be thinking of a function in Excell called CELL() but that only returns the formatting string such as "$0.00" or if the cell is protected/unprotected -- the CELL() doesn't provide color, bold, etc. (Tangent thought... I've always wondered why people ask Excel questions here instead of dedicated forums such as http://www.excelforum.com where there are more experts and better answers.) |
|
#5
|
|||
|
|||
|
I was unable to find this feature in Excel 2007. Doesn't mean it isn't there.
This function works in Excel 2007. Code:
Function CountBold(r As Range) As Long
CountBold = 0
Dim c As Range
For Each c In r
If c.Font.Bold Then
CountBold = CountBold + 1
End If
Next c
End Function
Quote:
![]() Actually, people come here because it's handy and quick. That's the tradeoff of a general-purpose board. Big audience who know a little about everything. Specialized boards know everything about a little. I happen to like www.ozgrid.com for Excel help, and I guess there are others that are very good too. |
|
#6
|
|||
|
|||
|
Also, many of us talk something closer to English than the denizens of tech centered boards. If you are newly fighting your way into a situation, it helps if your guide speaks a language you understand. There are multi-lengual tech geeks and some of us only speak tech, but the odds of getting an answer in English, here, are mildly higher.
|
|
#7
|
|||
|
|||
|
Quote:
Note that Parthol did an excellent job in formulating a precise, brief, clear question! |
|
#8
|
|||
|
|||
|
Just wanted to pop back in to say 'thanks' for the responses!
Also, yeah, I asked the Dope because it's quick, familiar, and the answers are typically just as good as those from tech forums. -P |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|