Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Format Help BOLD year in a specific vehicle application Column

Basically I am a mobile electronics installer. I have created an inventory of
what metra kits (www.metraonline.com) we have, where they are stored, and
specific vehicle application. Now what I would like is the year to be bolded.
It varies from line to line but most are like this "Hyndia Excel 86-89
Mitsubishi Precis 87-89" or "Mazda Multi Kit 86-95 Dash Bezel Mount" and
"Honda Accord 03-Up" Is it possible to custom format this to diffientiate
between the Make model, and the year?



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Format Help BOLD year in a specific vehicle application Column

Hi

You can do it manually by just highlighting the relevant characters in
the formula bar and pressing the Bold icon.
For a large list of cells, you would need to use some VBA code to
achieve this.

If you mark the range of cells on your sheet containing these entries,
then run the code below, it should carry out the task for you.

Sub BoldYear()
Dim test As String, First As Integer, Last As Integer, i As Integer,
Length As Integer
Dim c As Range
For Each c In Selection
test = c.Value
' find first numeric
For i = 1 To Len(test)
If IsNumeric(Mid(test, i, 1)) Then
First = i
Exit For
End If
Next

'find last numeric
For i = First + 1 To Len(test)
If Mid(test, i, 1) < "-" Then
If Not IsNumeric(Mid(test, i, 1)) Then
Last = i
Exit For
End If
End If
Next

If Last = 0 Then Last = i
Length = Last - First
' now embolden from first to last characters
With c.Characters(Start:=First, Length:=Length).Font
.FontStyle = "Bold"
End With
First = 0: Last = 0: Length = 0
Next c
End Sub


You can copy the code and paste it into your Visual Basic Editor
(VBE) in a Standard Module located in your file.

To do this,

Alt + F11 (open VBE)
Ctrl + R (open Project Explorer)
Select the file name on the left
Insert Module
Paste code in Module

David McRitchie has lots of useful help on his site at
http://www.mvps.org/dmcritchie/excel/install.htm
http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Regards

Roger Govier


"mobile electronics installer" <mobile electronics
wrote in message
...
Basically I am a mobile electronics installer. I have created an
inventory of
what metra kits (
www.metraonline.com) we have, where they are stored,
and
specific vehicle application. Now what I would like is the year to be
bolded.
It varies from line to line but most are like this "Hyndia Excel 86-89
Mitsubishi Precis 87-89" or "Mazda Multi Kit 86-95 Dash Bezel Mount"
and
"Honda Accord 03-Up" Is it possible to custom format this to
diffientiate
between the Make model, and the year?





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
Help with application of custom format to entire column Sprinkman Excel Discussion (Misc queries) 1 February 28th 06 10:26 PM
How can I sum only amounts that are in BOLD format within a column Wanda New Users to Excel 1 March 11th 05 07:32 PM
hyperlink an excel cell to a specific location wthin application f dirtboy New Users to Excel 1 January 17th 05 08:07 PM
hyperlink an excel cell to a specific location wthin application f dirtboy Excel Discussion (Misc queries) 0 January 17th 05 08:03 PM
Format an excel column as a date for a 5 day week for a year. dabenesch Excel Discussion (Misc queries) 1 December 30th 04 02:45 PM


All times are GMT +1. The time now is 03:45 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"