View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Border formatting row of cells

Hi Howard,

Am Sat, 25 Jan 2014 16:28:32 -0800 (PST) schrieb L. Howard:

SkillTec Room
Delegate Area
Interview Room
Telephone Appt
Out of Office_1
Out of Office_2


the named range for the days you can enlarge to include these areas.
Also the DeskRng range you have to enlarge analog.
Then you can change the upper part of the code to look for the row into
the DeskRng.
This could look like:

With Sheets("BLANK")
Set myRng = Range(.Range("X1"))
If Mid(myRng.Address, 2, 1) = "C" Then
myR = WorksheetFunction.Match(.Range("Y1"), _
Range(.Range("X1") & "DeskRng"), 0)
Else
myR = WorksheetFunction.Match(.Range("Y1"), _
Range(.Range("X1") & "DeskRng"), 0)
End If

Set myRng = Range(.Range("X1")).Rows(myR)
MsgBox myRng.Address
End With

For the days it is still working because the range names for the days
are correct.


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2