I have managed to develop the following elementary code for a cmdbutton on an excel spreadsheet...
Private Sub CommandButton1_Click( )
'Open an input box
Dim DateYear as String
DateYear=InputBox ("Enter a Year")
If DateYear="" Then exit sub
else......'here's where I get lost.
End Sub
If a year is entered in the textbos, then I want the cursor to move to the cell that has that date, and that part of the spreadsheet appear in the windows area. I have thousands of dates and don't want to keep scrolling through a massive spreadsheet looking for a particular date...It's been suggested I use VLOOKUP, but I don't know how to write the code...What would follow the Else. Column A contains my dates, and Column B the text....should be very simple, but I can't get it to work...
Private Sub CommandButton1_Click( )
'Open an input box
Dim DateYear as String
DateYear=InputBox ("Enter a Year")
If DateYear="" Then exit sub
else......'here's where I get lost.
End Sub
If a year is entered in the textbos, then I want the cursor to move to the cell that has that date, and that part of the spreadsheet appear in the windows area. I have thousands of dates and don't want to keep scrolling through a massive spreadsheet looking for a particular date...It's been suggested I use VLOOKUP, but I don't know how to write the code...What would follow the Else. Column A contains my dates, and Column B the text....should be very simple, but I can't get it to work...