LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Bold items within text string

Hi All,

I found a bit of code on the newsgroup that bolds the text within a
cell during a concatenation of several cells:
Sub BoldNotesTitle()

Dim s As String, sA1 As String, sA2 As String
Const s1 As String = "On "
Const s2 As String = ", please "
Const s3 As String = " funds for a margin call."


sA1 = Range("A1").Text
sA2 = Range("A2").Text


With Range("A4")
.Value = s1 & sA1 & s2 & sA2 & s3
.Characters(1 + Len(s1), Len(sA1)).Font.Bold = True
.Characters(1 + Len(s1) + Len(sA1) + Len(s2), Len(sA2)).Font.Bold
= True
End With

End Sub

I'm trying to take this concept and apply it to a range. I wrote a
formula (below) that does the concatenation I need. Somehow I need to
take my formula into code and BOLD the cells J$1, K$1, L$1, M$1, N$1.
My biggest question is how to I apply this formula to the range
H2:H500? Thanks!

=IF(ISBLANK(J2),"",J$1&" - "&J2&CHAR(10))&IF(ISBLANK(K2),"",K$1&" -
"&K2&CHAR(10))&IF(ISBLANK(L2),"",L$1&" -
"&L2&CHAR(10))&IF(ISBLANK(M2),"",M$1&" -
"&M2&CHAR(10))&IF(ISBLANK(N2),"",N$1&" - "&N2&CHAR(10))
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search if a string contains text matching items in a list neil Excel Worksheet Functions 3 March 11th 08 09:13 PM
how to apply bold within string text dragonball20cal Excel Worksheet Functions 7 July 23rd 07 03:18 AM
auto bold partial text in a string dave in Toronto Excel Discussion (Misc queries) 1 June 12th 07 01:07 PM
Join bold and non-bold text in one cell bkincaid Excel Discussion (Misc queries) 3 March 21st 06 12:58 AM
How do I ask Excel to count how many items are in BOLD TYPE? Head Honcho Excel Discussion (Misc queries) 1 August 5th 05 12:35 AM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"