Hey all! Beginner here
I get the "Object variable or with block variable not set" not sure why? I'd like the code to input specific values in cells based on months entered in in table header cells. Therefore the code should search for specific month names in each cell within the range MyRange, and enter figures in the cells beneath each months. Here is the code that I have. it shows me the error message after running and entering all the info I need. What is the error please? thanks
And so on...
I checked and all my variable are set, what have I done wrong? Thanks very much for your help

Code:
Dim PMonthRows As Range
Dim Cell As Object
Dim Aug13Range As Range
Dim Sep13Range As Range
Dim Oct13Range As Range
For Each Cell In PMonthRows
If Cell.Value = #8/1/2013# Then
If Aug13Range Is Nothing Then
Set Aug13Range = Range(Cell.Address)
End If
End If
Next
Aug13Range.Select
Aug13Range.Offset(1, 0).Value = 0
Aug13Range.Offset(2, 0).Value = 4
For Each Cell In PMonthRows
If Cell.Value = #9/1/2013# Then
If Sep13Range Is Nothing Then
Set Sep13Range = Range(Cell.Address)
End If
End If
Next
Sep13Range.Select
Sep13Range.Offset(1, 0).Value = 0
Sep13Range.Offset(2, 0).Value = 4
For Each Cell In PMonthRows
If Cell.Value = #10/1/2013# Then
If Oct13Range Is Nothing Then
Set Oct13Range = Range(Cell.Address)
End If
End If
Next
Oct13Range.Select
Oct13Range.Offset(1, 0).Value = 8
Oct13Range.Offset(2, 0).Value = 5
And so on...
I checked and all my variable are set, what have I done wrong? Thanks very much for your help
