I have 2 values, where: `A2` is a latitude and `B2` is a longitude. Both changes on `0.25` step.

I would like to use these values to autofill the table using loop.

The idea is, that for every single value (e.g `49`) I need another few values (for instance `-2`, `-1.75`, `-1.5`, `-1.25`, etc.) set in the same row, as per in the picture attached.

Firstly this loop (referring to one, latitude value):

```
Sub calc2()
    Dim i As Single
    With Worksheets("9")
    .UsedRange.clear
    .Range("a1").Value = "Input"
    .Range("f1").Value = "Output"
    For i = 40 To 55 Step 0.25
        Worksheets("1_GENERAL").Range("A2").Value = i
        With .Cells(Rows.Count, 1).End(xlUp)
        .Offset(1, 0).Value = i
        .Offset(1, 1).Value = Worksheets("4.MINUTES").Range("BL371").Value
        End With
    Next i
End With
End Sub

```

, which makes an autofill in 2 column (latitude value in 1st and output value in 2nd).
Secondly I was trying to modify this loop in order to vertical autofill, which allow me to set values in rows (1st row a longitude value, 2nd row output value).
Next steps should contain only an output values corresponding to relevant lon, lat value.

The loop looks like this:

```
Sub calc_full()
    Dim i As Single
    With Worksheets("9")
    .UsedRange.clear
    .Range("a1").Value = "Input"
    .Range("b1").Value = "Output"
    .Range("c1").Value = "Input"
    .Range("d1").Value = "Output"
    For i = 40 To 45 Step 0.25
    For k = -2 To 2 Step 0.25
        Worksheets("1_GENERAL").Range("A2").Value = i
        With .Cells(Rows.Count, 1).End(xlUp)
        .Offset(1, 0).Value = i
        .Offset(1, 1).Value = Worksheets("4.MINUTES").Range("BL371").Value
        End With
        With .Cells(Cols.Count, 1).End(xlUp)
        .Offset(2, 0).Value = k
        .Offset(2, 1).Value = Worksheets("4.MINUTES").Range("BL371").Value
        End With
    Next i
    Next k
End With
End Sub

```

However it doesn't work. I must have mix something. Basically my output value is located in different worksheet (4.MINUTES) and I would like to paste it in one place for different coordinates, making a table eventually (see an example in the attachment).
Any ideas how to do this?
I will be grateful a lot. Thank you in advance.

[![enter image description here](https://i.stack.imgur.com/M7w82.jpg)](https://i.stack.imgur.com/M7w82.jpg)

[![enter image description here](https://i.stack.imgur.com/Skfcs.jpg)](https://i.stack.imgur.com/Skfcs.jpg)