Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search if a string contains text matching items in a list | Excel Worksheet Functions | |||
how to apply bold within string text | Excel Worksheet Functions | |||
auto bold partial text in a string | Excel Discussion (Misc queries) | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) | |||
How do I ask Excel to count how many items are in BOLD TYPE? | Excel Discussion (Misc queries) |