Greetings,
This code highlights "Else" and says "Else without If". I am always running into little issues with If, Then statements, and it seems every time I do it I have to spend 15 minutes playing around with it until it works. No success this time It is comparing values from 2 ranges, and assigning a region to a column 5 cells over. ZipRef is an array of ranges. Any idea whats wrong? Thanks for any help.
[pre]
[/pre]
This code highlights "Else" and says "Else without If". I am always running into little issues with If, Then statements, and it seems every time I do it I have to spend 15 minutes playing around with it until it works. No success this time It is comparing values from 2 ranges, and assigning a region to a column 5 cells over. ZipRef is an array of ranges. Any idea whats wrong? Thanks for any help.
[pre]
Code:
For Each cell In Zips
For Each code In ZipRef(i)
If cell.Value >= code.Value And cell.Value <= code.Offset(0, 1).Value Then
Select Case i
Case 1
cell.Offset(0, 5).Value = "MW"
Case 2
cell.Offset(0, 5).Value = "West"
Case 3
cell.Offset(0, 5).Value = "SE"
Case 4
cell.Offset(0, 5).Value = "NE"
i = i + 1
Exit For
Else
Next code
End If
Next cell