Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Amy
 
Posts: n/a
Default How can I find and format specific cells automatically in Excel?

I format lengthy spreadsheets frequently and would like to know if it's
possible to find all cells with specific text (say, "Q*") and then format all
of those cells to a specific color and bold font. I'd like to accomplish
this automatically, if possible. Help!
  #2   Report Post  
Gary's Student
 
Posts: n/a
Default

This is an example. This code looks at the first 10X10 cells for the
occurance of the word "treasure". If the word is found, then the format of
that cell is changed.

You can adapt this for your use.

Sub markit()
Dim t As String
Dim t2 As String
t2 = "treasure"
For i = 1 To 10
For j = 1 To 10
t = Cells(i, j)
If InStr(t, t2) 0 Then
Cells(i, j).Select
With Selection.Font
.FontStyle = "Bold"
.ColorIndex = 6
End With
End If
Next j
Next i
End Sub
--
Gary's Student


"Amy" wrote:

I format lengthy spreadsheets frequently and would like to know if it's
possible to find all cells with specific text (say, "Q*") and then format all
of those cells to a specific color and bold font. I'd like to accomplish
this automatically, if possible. Help!

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
Excel Date Format - users should be able to override it automatic. jamezog Excel Discussion (Misc queries) 7 May 20th 10 02:45 PM
Format of cells problem... Alex Excel Discussion (Misc queries) 2 June 20th 05 05:36 PM
Select format cells Custom but Saves As Specil Why. Steved Excel Worksheet Functions 0 March 13th 05 12:06 AM
Find cells without multiple spacebars and format... BeSmart Excel Discussion (Misc queries) 2 January 27th 05 11:52 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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