View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default select multiple rows and format

Hi,

Right click your sheet tab, view code and paste this in and run it

Sub sonic()
Dim MyRange As Range
lastrow = Cells(Rows.Count, "E").End(xlUp).Row
Set MyRange = Range("E1:E" & lastrow)
For Each c In MyRange
If InStr(1, UCase(c), "COLLEGE") Then
c.EntireRow.Font.Bold = True
End If
Next
End Sub

Mike

"sdg8481" wrote:

Hi,

I have a fairly simple request, but i just just can't seems to find a
solution, hope one of you can help...

Basically, i need a VBA code that will bold the text of the entire row if
the word "College" exists somewhere in column E. It maybe worth pointing out
that this word may be part of a phrase so not sure if wildcard characters
will be needed.

If tried the usual and ideas found on this site, however i can't use the
simple filter options because my spreadsheet contains multiple empty rows,
therefore i think VBA id the way to go.

Hope this makes sense and that you can help.