Hello all, I am fairly new to this and starting to get my feet under the ground. I need to repeat the below macro a given number of times but am having trouble setting a loop up correctly. I put 'Range("Z" & i + 1).Select' at the end to move to the next row down and repeat the process. Is this necessary? Or is there a way to set up the loop to move down one row and start over there? Any help would be greatly appreciated.
Any insights or adjustments would be greatly appreciated. Thank you so much
Sub Zip_Lookup()
Dim Formulas As Range, Results As Range
i = ActiveCell.Row
Set Formulas = Range("AA5:AP5")
Set Results = Application.Range(Cell1:="AA" & i, Cell2:="AP" & i)
Range("Z" & i).Select
Range("Z" & i).Copy
Range("E18").PasteSpecial xlPasteValues
Formulas.Copy
Results.PasteSpecial xlPasteValues
Range("Z" & i + 1).Select
End Sub
Any insights or adjustments would be greatly appreciated. Thank you so much
Sub Zip_Lookup()
Dim Formulas As Range, Results As Range
i = ActiveCell.Row
Set Formulas = Range("AA5:AP5")
Set Results = Application.Range(Cell1:="AA" & i, Cell2:="AP" & i)
Range("Z" & i).Select
Range("Z" & i).Copy
Range("E18").PasteSpecial xlPasteValues
Formulas.Copy
Results.PasteSpecial xlPasteValues
Range("Z" & i + 1).Select
End Sub