Sort rows by bold item in any column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet a2 by q624 big. I need to see only the rows which have a
bold entry in any column. I have a formula for sorting by one column :
=get.cell(20,offset(indirect("a20"),row()-2,0)) but how do I have it search
all rows for a bold item in any of the columns?
 
Hi
if you want to sort/filter with a textformat you'll need VBA to get the
font property of your cells/rows
 
You can also do this via Word.

Copy the Excel table to Word. Set the font in your Find What field to Bold.
Replace any letter (^$) with £ find what text £ (£^&£). Copy the contents of
the table back to Excel and search for £.
 
You are creating a LOT of hassle for yourself by trying to store information
in formatting, as evidenced by the proposed solution for your problem.

Assuming there's some logic to WHY certain cells are bold, you you encapsulate
that logic in a formula column on the right, say column R, that returns the
count of the number of cells that are bold. Then you filter on that column.

If there's no logic to the application of the bold font, then you can put the
data in this column manually, or use a macro similar to this one posted by
John Green in 1998.

In column R, you would put the formula =COUNTBOLD(A2:Q2) and copy it down.

Then filter on this column for values > 0


Public Function CountBold(myRange As Range) As Long
Dim c As Range, count As Long

For Each c In myRange
If c.Font.Bold = True Then
count = count + 1
End If
Next c
CountBold = count
End Function
 

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

Back
Top