I am trying to create a budget using a Match function, but I can't even get to that point because the dynamic Range I am trying to create is returning the error: "Application-defined or object-defined error".
The range in question is rng
Sub Material()
Dim wSheet As Worksheet
Dim x, dwIndex, offSet, count, upperLeft, bottomRight, r, wall As Integer
Dim rng As Range
x = 0
For Each wSheet In Worksheets
If wSheet.Name = "Drywall Pricing" Then
dwIndex = wSheet.Index - 1
End If
Next wSheet
For i = 1 To dwIndex
If Sheets(i).Range("K1").Value > 0 Then
count = 9
offSet = 41
r = 27
For wall = 1 To count
offSet = (offSet * wall) - (offSet * 1)
upperLeft = (r + 16) + offSet
bottomRight = (r + 27) + offSet
rng = Sheets(i).Range(Cells(upperLeft, 0), Cells(bottomRight, 1))
Next wall
End If
Next i
End Sub
Does anyone have any clue the variable rng is not valid? Any help would be just freaking great because this is getting ridiculous.
Thanks in advance!