Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

worksheet

  Asked By: Jayden    Date: Jan 18    Category: MS Office    Views: 638
  

I have a number of cells on a worksheet which contain a mixture of bold and
normal type. Can somebody tell me how to extract the characters in bold from
the text in the cell.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Maliha Malik     Answered On: Jan 18

Create a user defined function thus:

Function blah(OrigStr As Range)
blah = ""
For i = 1 To Len(OrigStr)
If OrigStr.Characters(i, 1).Font.Bold = True Then blah = blah &
Mid(OrigStr, i, 1)
Next
End Function

(The line beginning
If...
ends with
Mid(OrigStr, i, 1)

It may be split above.)

Example of use in worksheet:
=blah(B3)

 
Didn't find what you were looking for? Find more on worksheet Or get search suggestion and latest updates.




Tagged: