How to bold Amount in Text formula

Occasional Contributor

In excel the following text i want to bold only which is following highlight text from selected section. how to bold it. 

 

="By debit to our account No.50000141, you are hereby advised to transfer an amount of" &" Rs."& TEXT(Table1[[#Totals],[Amount]], "#,##")&"/-" & "on account of salaries for the month of Dec-21. 

 

The sample file is attached for ready reference. 

 

6 Replies

@Jalil1985 I dare to say you can not!

Is any solution is available in Power Query or VBA?

@Jalil1985 PQ doesn't do bold formatting or anything alike. VBA is not my kind of thing.

Hi @Jalil1985 

I agree that it seems not possible without a macro, but with VBA it is possible.

Put the different parts in separate cells and generate A2 as static text;

bosinander_0-1641284557764.png

Sub boldSum()
    part1 = Range("Part_1").Value
    part2 = Range("Part_2").Value
    part3 = Range("Part_3").Value
    
    Range("a2").Select
    ActiveCell.Value = part1 & part2 & part3
    
    ActiveCell.Characters(Start:=Len(part1), Length:=Len(part2)).Font.FontStyle = "Bold"
End Sub

Thus, the attached file is xlsM.

-/-

i5:i7 are named Part_1 to 3 to be easy possible to move to another sheet with preferences. Cut and paste and tha macro will still be functional.

sorry its not solve my issue.
How come? Cannot or not allowed to run macro..?