I'm trying to find and select a cell in a row of dates in a worksheet called archief
. The range of the row with dates is Sheets("archief").Range("B2:HT2")
. The input for the date I'm looking for is in Sheets("Rekenblad").Range("B29")
.
After finding the cell in the row of dates, I need to select the cell 1 beneath it. So for example the date I'm looking for is in B2
, then I need to select B3
.
After that I want to paste something that I copied before.
How can I do this using VBA? This is the code that I have tried so far.
Sub FindCell()
Dim RowDates As Range
Dim InputCell As Range
Set InputCell = Sheets("Rekenblad").Range("B29")
Set RowDates = Sheets("archief").Range("B2:HT2").Find(What:=InputCell, _
SearchOrder:=xlByColumns).Select
End Sub