i am trying to return the row number based on the contents in column A. basically i need to search down column A until i find yesterdays date and return the corresponding row number. so far i have got...
i'm getting frustrated now cos i had this working earlier today but can't remember how
. i knonw the problem lies with
but i just can't see what it is.
Don't laugh at me for being dumb, it's been one of those days!
Cheers, Craig
Si fractum non sit, noli id reficere
Code:
Function export()
Dim rowNum
Dim filename
Dim date1
Dim rownum As Long
date1 = Date - 1
rownum = Worksheets("sheet1").Range("a:a").Find(date1).Row
'some more code...
End Function
![[mad] [mad] [mad]](/data/assets/smilies/mad.gif)
Code:
rownum = Worksheets("sheet1").Range("a:a").Find(date1).Row
Don't laugh at me for being dumb, it's been one of those days!
Cheers, Craig
Si fractum non sit, noli id reficere