Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Format question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Regina - 27 Sep 2004 14:00 GMT
I'm using 2002 and would like to do the following:
We have PN: ####### hundreds of times in our spreadsheets
and have been directed to make the PN: ####### line (out
of 6 lines) bold.  Is there a quick search and replace
function to use in Excel even though the #'s after PN:
will be different every time?
thank you in advance for any help you can provide!
Regina
JE McGimpsey - 27 Sep 2004 18:03 GMT
you could use a macro like this:

   Public Sub BoldPN()
       Const sSEARCH As String = "PN:"
       Dim rFound As Range
       Dim sFirst As String
       With ActiveSheet.Cells
           Set rFound = .Find( _
               What:=sSEARCH, _
               LookIn:=xlValues, _
               LookAt:=xlPart, _
               MatchCase:=False)
           If Not rFound Is Nothing Then
               sFirst = rFound.Address
               Do
                   rFound.Font.Bold = True
                   Set rFound = .FindNext(after:=rFound)
               Loop Until rFound.Address = sFirst
           End If
       End With
   End Sub

If you're not familiar with macros, take a look at

   http://www.mvps.org/dmcritchie/excel/getstarted.htm

> I'm using 2002 and would like to do the following:
> We have PN: ####### hundreds of times in our spreadsheets
[quoted text clipped - 4 lines]
> thank you in advance for any help you can provide!
> Regina
Regina - 27 Sep 2004 18:35 GMT
thank you JE, we will give it a whirl.
Sincerely,
Regina
>-----Original Message-----
>you could use a macro like this:
[quoted text clipped - 32 lines]
>> Regina
>.
Regina - 29 Sep 2004 18:35 GMT
I'm sorry, I should've been more specific. When I ran the
macro, the whole cell became bold. What I should've
written is that the PN: #### that needs to be bold is in a
cell with other lines, where we hit Alt Enter as a return
to next line, so it appears like this but all in one cell:
Kit Label 213
Equipment, PN: #######
VXYIMY
Quantity: 8
Can you help?
thanks so much,
Regina
>-----Original Message-----
>thank you JE, we will give it a whirl.
[quoted text clipped - 40 lines]
>>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.