View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Clivey_UK[_2_] Clivey_UK[_2_] is offline
external usenet poster
 
Posts: 1
Default Finding a date & Selection.End(xlDown)


Stefi,
1. Many thanks. Your Tomorrow Sub worked a treat and I see where I was
going wrong now. Also handy to have the On Error code.

2. Here's an example. If I have from A1 to A13 the following:
Column A
Row 1: Data
Row 2:
Row 3: Data
Row 4: Data
Row 5: Data
Row 6: Data
Row 7: Data
Row 8:
Row 9:
Row 10: Data
Row 11:
Row 12:
Row 13: Data
Starting at A1, I want to do the equivalent of Ctrl Shift Down-Arrow
four times which selects in the example above A1:A13. Over time the 2nd
section of data (currently A3:A7) will grow in height so I can't always
select A1:A13. There may sometimes be data below A13 (separated by more
blanks) and I don't want that in the selection.
Hope that makes it clearer. :)
Clive

Stefi Wrote:
Try to use this method:

Sub tomorrow()
On Error GoTo Nohit
Cells.Find(What:=Date + 1).Activate
On Error GoTo 0
Exit Sub
Nohit:
'Take measures if not found!
MsgBox "tomorrow's date not found"
End Sub

Regards,
Stefi
Clivey_UK's Profile:

http://www.excelforum.com/member.php...o&userid=32569
View this thread:

http://www.excelforum.com/showthread...hreadid=536312

[/color]


--
Clivey_UK
------------------------------------------------------------------------
Clivey_UK's Profile: http://www.excelforum.com/member.php...o&userid=32569
View this thread: http://www.excelforum.com/showthread...hreadid=536312