I am trying to figure out how to create a loop that will use the code I've written on all rows in a column, does anyone know what the looping code would look like?
Sub Average_Donation()
Dim r1 As Range, r2 As Range, r3 As Range
Dim iCell As Range
Set r1 = Range("E3")
Set r2 = Range("G3")
Set r3 = Range("P3")
If r1.Value <> 0 Then
r3.Value = r2.Value / r1.Value
End If
r3.NumberFormat = "00.0%"
For Each iCell In Range("r3").Cells
iCells = "Yes"
Next iCell
End Sub
Sub Average_Donation()
Dim r1 As Range, r2 As Range, r3 As Range
Dim iCell As Range
Set r1 = Range("E3")
Set r2 = Range("G3")
Set r3 = Range("P3")
If r1.Value <> 0 Then
r3.Value = r2.Value / r1.Value
End If
r3.NumberFormat = "00.0%"
For Each iCell In Range("r3").Cells
iCells = "Yes"
Next iCell
End Sub