Advertisement
dave3009

DSym

May 5th, 2020
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Enum DimSize
  2.     minRow = 5 ' Start Row point
  3.    maxRow = 20 ' End Row point
  4. End Enum
  5.  
  6. Sub Idea()
  7. Dim c As Long ' Column ref
  8. Dim r As Long ' Row ref
  9. Dim ColArr() As Variant
  10.  
  11. ColArr = Array(11, 13) ' columns K and M, you can add more as neceassry
  12.  
  13. For r = DimSize.minRow To DimSize.maxRow
  14.     For c = LBound(ColArr) To UBound(ColArr)
  15.         Debug.Print Cells(r, ColArr(c)).Address ' line to test your array
  16.        ' insert your action code here
  17.    Next c
  18. Next r
  19.  
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement