MadeleineB
New Member
- Joined
- Sep 23, 2008
- Messages
- 18
First => I'm trying to return the row number of the first instant of the word "Day 1" in a column, looking down the column.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
></o
>
Second => Once I have the row number I will then format the columns C:N in row ? with a top border.<o
></o
>
I have the second part done (see below), but I'm stuck on the first:
I was looking as using .Find or xlUp with .Address. Anything I try is not working.
'------------------------first---------------------------------------
myDay1row = Worksheets("Business").Range("C1:C106").Find(What:="Day 1", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).
'-----------------------second--------------------------------------
Worksheets("Business").Range("C" & myDay1row & ":N" & myDay1row).Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With




<o


Second => Once I have the row number I will then format the columns C:N in row ? with a top border.<o


I have the second part done (see below), but I'm stuck on the first:
I was looking as using .Find or xlUp with .Address. Anything I try is not working.
'------------------------first---------------------------------------
myDay1row = Worksheets("Business").Range("C1:C106").Find(What:="Day 1", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).
'-----------------------second--------------------------------------
Worksheets("Business").Range("C" & myDay1row & ":N" & myDay1row).Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With