Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Check for text within cells and make bold

Hi,

Is it possible to check the text within a group of cells (each cell contains
a full sentence) and if the words "PROVISIONAL SUM" are in a cell, then make
only the text "PROVISIONAL SUM" bold.
eg A3 = Supply and install conduits for power cable beneath proposed roads
and existing trees (PROVISIONAL SUM)

Thanks
Troy





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Check for text within cells and make bold

Hi Troy
try the following macro (processes the current selection):

Sub foo()
Dim rng As Range
Dim cell As Range
Dim start_str As Integer

Set rng = Selection
For Each cell In rng
start_str = InStr(cell.Value, "PROVISIONAL SUM")
If start_str Then
cell.Characters(start_str, 15).Font.Bold = True
End If
Next
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

TroyB wrote:
Hi,

Is it possible to check the text within a group of cells (each cell
contains a full sentence) and if the words "PROVISIONAL SUM" are in a
cell, then make only the text "PROVISIONAL SUM" bold.
eg A3 = Supply and install conduits for power cable beneath proposed
roads and existing trees (PROVISIONAL SUM)

Thanks
Troy


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
Can i make text in cells c60@n60 bold & black if sum of C59 is gre Spartan C10 Excel Worksheet Functions 7 February 7th 09 08:30 PM
Bold text in check box denise Excel Discussion (Misc queries) 3 September 13th 06 11:24 PM
How to check for a bold text formating through (in) a formula? Dmitry Kopnichev Excel Discussion (Misc queries) 6 January 25th 06 04:23 PM
How to check for a bold text formating through (in) a formula? Dmitry Kopnichev Excel Worksheet Functions 6 January 25th 06 04:23 PM
Sub to make text bold ksnapp[_7_] Excel Programming 1 February 25th 04 10:49 PM


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