I wrote the following For Loop to copy and paste several ranges from one sheet to another. I used an array. The procedure works fine, but I was looking for a shorter way to do the same.
Dim copyRange(1 To 3) As String
Dim pasteRange(1 To 3) As String
Dim refRange(1 To 3) As String
Dim i As Long
copyRange(1) = "A5"
copyRange(2) = "G5"
copyRange(3) = "H5"
refRange(1) = "A"
refRange(2) = "G"
refRange(3) = "H"
pasteRange(1) = "BE3"
pasteRange(2) = "CA2"
pasteRange(3) = "CD2"
For i = 1 To 3
refApplicantFlow.Range(copyRange(i), refApplicantFlow.Range(refRange(i) & Rows.Count).End(xlUp)).Copy _
calcCalculations.Range(pasteRange(i))
Next i
Range(target(i)).Value = Range(source(i)).Valuesyntax? Wheretargetandsourceare arrays of strings that identify the range(s) to copy values to and from?