Liiuc
Liiuc

Reputation: 182

How this macro works in Excel vba?

I'm new to Excel VBA and it's actually my first time using it.

I am not understanding this specific line in my macro, that is inserted in a closed loop:

Sheets("LocalizedText").Range("E" & i2).Value = Sheets("Sheet1").Range(col & i).Value

If you need it here it is the full macro:

Dim i As Long
Dim i2 As Long
Dim col As String
col = "B"
i = 1
i2 = 1
Dim con As Long
con = 1
Do While con < 13425
    Sheets("LocalizedText").Range("E" & i2).Value = Sheets("Sheet1").Range(col & i).Value
    i = i + 1
    i2 = i2 + 2
    con = con + 1
Loop
End Sub

Can someone explain me how is this macro working?

Upvotes: 0

Views: 44

Answers (1)

Olivier Depriester
Olivier Depriester

Reputation: 1625

For each row of column B from the sheet Sheet1, it will write the value into column E from sheets LocalizedText but leaving a blank row between 2 rows

Upvotes: 1

Related Questions