I need to call an homemade function (GetCoordinates) in a loop and apply it at each loop step.
I have a column with data (Starting at L2) and I need to apply my personnal function GetCoordinates to this data and write the result on the column next to it (so starting at M2)
NumRows = Range("L2", Range("L2").End(xlDown)).Rows.Count
Range("L2").Select
For x = 1 To NumRows
Selection.Offset(, 1).Formula = "=GetCoordinates(L&x)"
ActiveCell.Offset(1, 0).Select
Next
My problem is that I don't know how to apply my function to each cell. How should it be written so that the function is called for each cell in the loop? (The GetCoordinates function works fine)