PLease review the attachment and code it carries in it.
This code counts the data from sheet2 and stores it in 'Count' variable and in-turn inserts that value in sheet1 (D3).
I was this D3 value (Basically count value) to be hyper-linked to Data it counted. Is it possible to achieve..?
My basic intent is, if the user clicks on this value (hyperlinked) he must get all the data of that count.
This is first time i am trying this kind of, kindly help.
Any alternate suggestions are most welcome.
Sub test()Dim tday As Date, tend As Date Dim Count As Integer Dim cell As Range tday = Date tend = tday + 4 Count = 0 Sheet2.Activate For Each cell In ActiveSheet.Range("A2", ActiveSheet.Cells(Rows.Count, "A").End(xlUp)) If cell.Value = 1 And cell.Offset(0, 1).Value >= tday And cell.Offset(0, 1).Value <= tend Then Count = Count + 1 End If Next cell Sheet1.Range("D3").Value = Count End Sub