Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Find cells with a specific character in them and conditionally format cell

Hi

I want to format all rows in which the first cell in the row has a
comma in it somewhere.
Part of code only below:
A compile eror occurs at Find?

For Each cell In RefNoRange 'loops through
each cell in the reference number range

If IsError(Find(",", cell)) Then Else 'looks
for a comma in the ref number,
With cell.EntireRow
.RowHeight = 32
.VerticalAlignment = xlCenter
'.Font.ColorIndex = 1 'black
.Font.ColorIndex = 5 'blue
.Font.Size = 14
.Font.Name = "comic"
.Font.Bold = True
.Font.Italic = True


Any help would be gratefully received

Ritchi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Find cells with a specific character in them and conditionally for

If InStr(cell.Value, ",") 0 Then
--
Gary's Student
gsnu200705


"RITCHI" wrote:

Hi

I want to format all rows in which the first cell in the row has a
comma in it somewhere.
Part of code only below:
A compile eror occurs at Find?

For Each cell In RefNoRange 'loops through
each cell in the reference number range

If IsError(Find(",", cell)) Then Else 'looks
for a comma in the ref number,
With cell.EntireRow
.RowHeight = 32
.VerticalAlignment = xlCenter
'.Font.ColorIndex = 1 'black
.Font.ColorIndex = 5 'blue
.Font.Size = 14
.Font.Name = "comic"
.Font.Bold = True
.Font.Italic = True


Any help would be gratefully received

Ritchi


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Find cells with a specific character in them and conditionally format cell

You have lots of errors. Try this
Sub formatif1()
For Each c In RefNoRange 'Selection
If InStr(c, ",") 0 Then
MsgBox c.Address
With c.EntireRow
.RowHeight = 32
.VerticalAlignment = xlCenter
.Font.ColorIndex = 5 'blue
.Font.Size = 14
.Font.Name = "comic"
.Font.Bold = True
.Font.Italic = True
End With
End If
Next c
End Sub


--
Don Guillett
SalesAid Software

"RITCHI" wrote in message
oups.com...
Hi

I want to format all rows in which the first cell in the row has a
comma in it somewhere.
Part of code only below:
A compile eror occurs at Find?

For Each cell In RefNoRange 'loops through
each cell in the reference number range

If IsError(Find(",", cell)) Then Else 'looks
for a comma in the ref number,
With cell.EntireRow
.RowHeight = 32
.VerticalAlignment = xlCenter
'.Font.ColorIndex = 1 'black
.Font.ColorIndex = 5 'blue
.Font.Size = 14
.Font.Name = "comic"
.Font.Bold = True
.Font.Italic = True


Any help would be gratefully received

Ritchi



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 conditionally format 1 cell to look at 5 cells DFRESH Excel Discussion (Misc queries) 2 February 19th 09 08:25 PM
Format cell to accept only specific character-reject others aetzkin Excel Discussion (Misc queries) 2 December 27th 05 05:03 PM
formatting a specific character or number in each cell within a rangeof cells Colleen[_3_] Excel Programming 4 September 12th 05 07:23 PM
how to format only a specific character or number in each cell withina range of cells Colleen Excel Worksheet Functions 1 September 12th 05 05:44 PM
How can I find and format specific cells automatically in Excel? Amy Excel Worksheet Functions 1 August 6th 05 03:00 PM


All times are GMT +1. The time now is 11:30 PM.

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"