ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Date cell using Calendar Control (https://www.excelbanter.com/excel-programming/446082-find-date-cell-using-calendar-control.html)

Mik

Find Date cell using Calendar Control
 
I have a list of dates (in sequence) in cells A3:A100.
A calendar control inserted into my worksheet (not via a userform),
currently displays the chosen date in cell A1.

This works fine, however....

When the date is chosen from the calendar control, I want to select /
goto the corresponding date within cells A3:A100.

How can this be done?

For info, I'm using Calendar Control 11.0, and Excel 2007 and 2010.

Auric__

Find Date cell using Calendar Control
 
Mik wrote:

I have a list of dates (in sequence) in cells A3:A100.
A calendar control inserted into my worksheet (not via a userform),
currently displays the chosen date in cell A1.

This works fine, however....

When the date is chosen from the calendar control, I want to select /
goto the corresponding date within cells A3:A100.

How can this be done?

For info, I'm using Calendar Control 11.0, and Excel 2007 and 2010.


Something like this, perhaps?

For ro = 3 To 100
If CDate(Cells(ro, 1).Value) = Calendar1.Value Then
Cells(ro, 1).Select
Exit For
End If
Next

--
- Are you good with people?
- I can kill one in less than two seconds!


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com