Bold a Specific text or Number in formula

majhar420

New Member
Joined
Feb 25, 2014
Messages
20
Office Version
  1. 2010
Platform
  1. Windows
I want to Join two cell with "&" A1=13 and B1="Name" . when Join these two ,i want "Name" show Bold letter.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I want to Join two cell with "&" A1=13 and B1="Name" . when Join these two ,i want "Name" show Bold letter.
You cannot do that using formulas... Excel will only permit text within a single cell to have multiple font formats if that text is a constant (that is, not produced by a formula). What you want to do is possible using VBA event code... you would no longer have a formula in the cell, rather, the VBA code would perform the concatenation and then format the text for you. Would you be up for using a VBA solution? If so, you will need to tell us all of the cells that the code needs to monitor and where the output should go to.
 
Upvote 0
It would be fine if i get VBA solution . I want use concatenation column A and B . The out put in column C.
 
Upvote 0
It would be fine if i get VBA solution . I want use concatenation column A and B . The out put in column C.
Give this event code a try...
Code:
[table="width: 500"]
[tr]
	[td]Private Sub Worksheet_Change(ByVal Target As Range)
  Dim Cell As Range
  If Not Intersect(Target, Columns("A:B")) Is Nothing Then
    Application.EnableEvents = False
    For Each Cell In Intersect(Target, Columns("A:B"))
      Cells(Cell.Row, "C").Value = Cells(Cell.Row, "A").Value & Cells(Cell.Row, "B").Value
      Cells(Cell.Row, "C").Characters(Len(Cells(Cell.Row, "A").Value) + 1).Font.Bold = True
    Next
    Application.EnableEvents = True
  End If
End Sub[/td]
[/tr]
[/table]

HOW TO INSTALL Event Code
------------------------------------
If you are new to event code procedures, they are easy to install. To install it, right-click the name tab at the bottom of the worksheet that is to have the functionality to be provided by the event code and select "View Code" from the popup menu that appears. This will open up the code window for that worksheet. Copy/Paste the event code into that code window. That's it... the code will now operate automatically when its particular event procedure is raised by an action you take on the worksheet itself. Note... if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top