Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Worksheets("Overview").Activate 'activate worksheet Overview
- currentdate = ActiveSheet.Cells(H5) 'select date value
- For Each ws In Worksheets 'loop over every worksheet except the Overview sheet
- If ws.Name = fruit Then 'crossreference name worksheet with fruit in Overview sheet
- ws.Activate 'activating the selected worksheet
- If ws.Range("A1:A365") = currentdate Then 'looking for the correct date in the selcted worksheet
- fruit = ws.Name
- Next ws
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement