Updated code but it's still not working 
Basically it's just copying cells 1 to 22 from the CMDB sheet and pasting them in the SDC_PROC sheet in D2 - D23. Not sure what I've done wrong
Sub IsBetween()
' ### INITIAL SETUP
Dim INCR As Long
Dim cell As Range
Dim testvalue As Variant
Dim lwr As Variant
Dim upr As Variant
Dim equaltype As Boolean
Dim IsBetween As Integer
Dim i As Long
Dim j As Long
Dim sheet As Worksheet
Dim UsedRange As Range
Application.ScreenUpdating = False
Sheets("CMDB").Select
Set sheet = ActiveSheet
Set cell = sheet.UsedRange
' ### START LOOP FOR ALL CMDB ASSETS
For i = 1 To cell.Rows.Count
INCR = 1
' ### START LOOP FOR ALL ZONES
For j = 1 To 22
INCR = INCR + 1
Sheets("SDC_PROD").Select
lwr = ("D" & j)
upr = ("E" & j)
Sheets("CMDB").Select
testvalue = ("E" & i)
If testvalue >= lwr And testvalue <= upr Then
Sheets("SDC_PROD").Select
Range("A" & j).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CMDB").Select
Range("D" & INCR).Select
ActiveSheet.Paste
End If
' ### END ZONE LOOP
Next j
' ### END CMDB ASSETS LOOP
Next i
Application.ScreenUpdating = True
End Sub
Bookmarks