Thread
:
Seclect Column or Range according to Cell's Contents
View Single Post
#
2
Posted to microsoft.public.excel.programming
Bob Phillips
external usenet poster
Posts: 380
Seclect Column or Range according to Cell's Contents
Dim oCell As Range
With Range("A7:AJ7")
Set oCell = .Find("Sunday", LookIn:=xlValues)
If Not oCell Is Nothing Then
oCell.EntireColumn.Select
End If
End With
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Nora N" <Nora
wrote in message
...
I need a VBA macro to do the following
I have to search for a specific word say "Sunday" within a range (A7:AJ7).
When the word is found, the column containing the cell with the word
"Sunday", or a special range within the column should be shaded.
Any help would be much appreciated
Reply With Quote
Bob Phillips
View Public Profile
Find all posts by Bob Phillips