Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 47
Default formula to BOLD partial number

Helo,

MY experience with your group is awesome. Can you help me with this one,

I have time data "06:09:23" is there a formula where I can indicate the
first two caracters ("06") to be bold. Manually to do this could be quite a
hassle for a couple of hundred cells.

Thank you

smile
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default formula to BOLD partial number

One simple way

Sub boldleft2()
For Each c In Selection
c.Characters(1, 2).Font.Bold = True
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"israel" wrote in message
...
Helo,

MY experience with your group is awesome. Can you help me with this one,

I have time data "06:09:23" is there a formula where I can indicate the
first two caracters ("06") to be bold. Manually to do this could be quite
a
hassle for a couple of hundred cells.

Thank you

smile


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,651
Default formula to BOLD partial number

On Tue, 11 Aug 2009 08:21:01 -0700, israel
wrote:

Helo,

MY experience with your group is awesome. Can you help me with this one,

I have time data "06:09:23" is there a formula where I can indicate the
first two caracters ("06") to be bold. Manually to do this could be quite a
hassle for a couple of hundred cells.

Thank you

smile


If those values are Excel time values, then you would have to first convert
them to text strings. If you do that, any formula which has these values as a
precedent would have to be changed, to take that into account.

To do this, you'd need a VBA Sub procedure.

To enter this Macro (Sub), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this Macro (Sub), first select the cells you wish to change. Then
<alt-F8 opens the macro dialog box. Select the macro by name, and <RUN.


======================
Option Explicit
Sub boldleft2()
Dim c As Range
For Each c In Selection
With c
.NumberFormat = "@"
.Value = Format(.Value, "hh:mm:ss")
.Font.Bold = False
.Characters(1, 2).Font.Bold = True
End With
Next c
End Sub
=========================
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if font is bold then cell value is number Jon Excel Discussion (Misc queries) 1 September 13th 08 11:50 AM
Search for a partial number das Excel Worksheet Functions 2 May 30th 08 07:31 PM
Bold the number only in a concatenated with text formula... MarvInBoise Excel Worksheet Functions 4 January 11th 08 05:20 PM
Sumif - for bold number only Lawrence Excel Discussion (Misc queries) 1 October 17th 07 09:19 AM
auto bold partial text in a string dave in Toronto Excel Discussion (Misc queries) 1 June 12th 07 01:07 PM


All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"