J
jhong
hi Guyz,
I have new challenge at my work and still i am asking your kindness to
lend me some code to be able to finish this task. By the way, the code
i have here is derived from previous topics here but still i am
lacking the gift to accomplish what i want.
Here's the scenatio, i am getting five words from six different cells.
The words from these cells are linked from other tabs within my
workbook except for one word in which it is hard coded.
Here's what i want to happen, when the macro is run the string result
is stated below;
Bold not-bold bold not-bold bold not-bold (six words concatinated).
Words in bold font style will show alternating. And here's my
struggling codes below;
Sub Try()
Dim myRangeA1 As String
'Dim myRangeA2 As String
Dim myRangeA3 As String
Dim myRangeA4 As String
Dim myRangeA5 As String
Dim myRangeA6 As String
myRangeA1 = Sheets("Diary").Range("A1")
'myRangeA2 = Sheets("Diary").Range("A2")
myRangeA3 = Sheets("Diary").Range("A3")
myRangeA4 = Sheets("Diary").Range("A4").Text
myRangeA5 = Sheets("Diary").Range("A5")
myRangeA6 = Sheets("Diary").Range("A6").Text
With Range("A5")
.Value = myRangeA1 & " " & "not Bold" & " " & myRangeA3 & " " &
myRangeA4 & " " & myRangeA5 & " " & myRangeA6
.Characters(1, Len(myRangeA1)).Font.Bold = True
.Characters(1 + Len(myRangeA1) + Len(myRangeA3)).Font.Bold = True
End With
End Sub
Hoping or your kind consideration
Thanks,
jerome
I have new challenge at my work and still i am asking your kindness to
lend me some code to be able to finish this task. By the way, the code
i have here is derived from previous topics here but still i am
lacking the gift to accomplish what i want.
Here's the scenatio, i am getting five words from six different cells.
The words from these cells are linked from other tabs within my
workbook except for one word in which it is hard coded.
Here's what i want to happen, when the macro is run the string result
is stated below;
Bold not-bold bold not-bold bold not-bold (six words concatinated).
Words in bold font style will show alternating. And here's my
struggling codes below;
Sub Try()
Dim myRangeA1 As String
'Dim myRangeA2 As String
Dim myRangeA3 As String
Dim myRangeA4 As String
Dim myRangeA5 As String
Dim myRangeA6 As String
myRangeA1 = Sheets("Diary").Range("A1")
'myRangeA2 = Sheets("Diary").Range("A2")
myRangeA3 = Sheets("Diary").Range("A3")
myRangeA4 = Sheets("Diary").Range("A4").Text
myRangeA5 = Sheets("Diary").Range("A5")
myRangeA6 = Sheets("Diary").Range("A6").Text
With Range("A5")
.Value = myRangeA1 & " " & "not Bold" & " " & myRangeA3 & " " &
myRangeA4 & " " & myRangeA5 & " " & myRangeA6
.Characters(1, Len(myRangeA1)).Font.Bold = True
.Characters(1 + Len(myRangeA1) + Len(myRangeA3)).Font.Bold = True
End With
End Sub
Hoping or your kind consideration
Thanks,
jerome