Need Macro restructered please help

Sub mySearch()
For Each gCell In Range("G1", Range("G65536").End(xlUp))
If IsEmpty(Cells(gCell.Row, 8)) Then
For Each c In Range("Z1:AOO324597")
I = Application.Match(gCell.Value, Range(c, Cells(324597, c.Column)), 0)
If Not IsError(I) Then
Cells(gCell.Row, 8) = I
Exit For
End If
Next
If IsEmpty(Cells(gCell.Row, 8)) Then
Cells(gCell.Row, 8) = "#N/A"
End If
End If
Next
End Sub
I need the above code to be changed, for example instead of this code searching for data in the range Z1 to AOO324597; I want it to be able search in Column Z1 to 324597 instead.
if any body can help it would much appreciated! Thank you

Vba count rows thst are found between 2 points

Hello, I have data in one column over 300 thousand pieces of data this data has dates attached to some of them, I need to be able to count the rows between starting from the top and running down count between the first two dates and return in the next column the two dates and to the right of the two dates return how many rows are found between them. Then it continue starting from the second date of the first set that it ran through and returned count of rows it will start there and run to the next date it encounters and return the count of rows in between and return count. Keep in mind the rows in between the dates have no dates attached. That is why is counting them. I appreciate your help thank you!

Vba count rows thst are found between 2 points

Hello, I have data in one column over 300 thousand pieces of data this data has dates attached to some of them, I need to be able to count the rows between starting from the top and running down count between the first two dates and return in the next column the two dates and to the right of the two dates return how many rows are found between them. Then it continue starting from the second date of the first set that it ran through and returned count of rows it will start there and run to the next date it encounters and return the count of rows in between and return count. Keep in mind the rows in between the dates have no dates attached. That is why is counting them. I appreciate your help thank you!

Ok I'll try it and let you

Ok I'll try it and let you know, thank you!

It worked, great job!!! I

It worked, great job!!! I will send another one thst needs restructuring as well as it has a similar problem. Thank you very much!