Method 1 – Use the Cells.Value Property in VBA to Join Different Fonts
- Go to the Developer tab >> select Visual Basic. You can also press Alt + F11.
- In the VBA window, select Module in Insert.
- Enter the code in the new module.
- Click Run.
Sub mergeFONT()
For k = 5 To 15
Cells(k, 4).Value = Cells(k, 2).Value & " " & Cells(k, 3).Value
For i = 1 To Cells(k, 2).Characters.Count
Cells(k, 4).Characters(i, 1).Font.Name = Cells(k, 2).Characters(i, 1).Font.Name
Next
For i = 1 To Cells(k, 3).Characters.Count
Cells(k, 4).Characters(Cells(k, 2).Characters.Count + i + 1, 1).Font.Name = Cells(k, 3).Characters(i, 1).Font.Name
Next
Next k
End Sub
Cells(5, 4).Value refers to the value of the cells in the 5th row and the 4th column. Cells(k, 4).Value is in a loop in which k varies from 5 to 15 and indicates all cells in the Full Name column. This VBA code concatenates cells and restores original font styles.
The text in B5 and C5 will be combined in D5 with different fonts. All the fonts of cells in different rows will be combined after running the VBA code.
Method 2 – Concatenate Different Fonts with the Range.Value Property in VBA
- Go to the Developer tab >> select Visual Basic or press Alt + F11.
- Select Module in Insert.
- Enter the code in the module.
- Click Run.
Sub mergeRANGEFONT()
For j = 5 To 15
Range("D" & j).Value = Range("B" & j).Value & " " & Range("C" & j).Value
For i = 1 To Range("B" & j).Characters.Count
Range("D" & j).Characters(i, 1).Font.Name = Range("B" & j).Characters(i, 1).Font.Name
Next
For i = 1 To Range("C" & j).Characters.Count
Range("D" & j).Characters(Range("B" & j).Characters.Count + i + 1, 1).Font.Name = Range("C" & j).Characters(i, 1).Font.Name
Next
Next
End Sub
The text in B5 and C5 is combined in D5 with different font styles. This VBA code combines all fonts of cells in different rows.
How to Use Two Fonts in One Cell in Excel Without VBA
- Select the word “Concatenate” in B4, and select the font: Amasis MT Pro Light, bold and italic.
A word was converted into a style. Repeat the process for other words.
How to Concatenate Cells with Different Formats in Excel
In the following example, the Product column is in General format, the Price column in Accounting format, and the Concatenation column in General format.
- Enter the following formula in D5 to join B5 and C5.
=CONCATENATE(B5, " Price: ",TEXT(C5,"$#,##0.00_);($#,##0.00)"))
Formula Breakdown:
- TEXT(C5,”$#,##0.00_);($#,##0.00)”): C5 is changed into a text string and given a number style. “$#,##0.00_);($#,##0.00)” indicates that positive numbers will be shown with a dollar sign, comma separators, and two decimal places.
- Between the value in B5 and the structured value in C5, the “Price:” text string will be inserted.
- The CONCATENATE function will merge B5, “Price:” and the structured value in C5.
Output: SSD Price: $100
How to Concatenate Text and Numbers Keeping the Formatting in Excel
The formula in D5 is:
=B5 & " " & TEXT(C5, "$#,#0.00")
Formula Breakdown
- TEXT(C5, “$#,#0.00”) formats the numerical value in C5. You can apply the custom number format “$#,#0.00”. For clarity, this format shows numbers with a dollar sign ($) and a thousand separator (,) in the currency format. The format shows cents with two decimal points.
- The combined string produced by the ampersand operator combines the text in B5 with the formatted number in C5, preserving the style of the number.
Frequently Asked Questions
- Can I concatenate text with different fonts in Excel and use it in other programs?
Answer: Yes, you can concatenate text with different fonts in Excel and copy and paste it into other programs such as Word, PowerPoint, or Photoshop.
Download Practice Workbook
Download the practice workbook.
Related Articles
- How to Concatenate Arrays in Excel
- How to Concatenate If Cell Values Match in Excel
- How to Concatenate with VLOOKUP in Excel
- How to Concatenate Email Addresses in Excel
- How to Concatenate Decimal Places in Excel
- How to Concatenate Cells with If Condition in Excel
- Combine CONCATENATE & TRANSPOSE Functions in Excel