fill functoi nvba code example

Example 1: how to continue formula in below line in vba code

Range("tablename[columnname]").Formula = "=G3&"",""&L3"

Example 2: how to continue formula in below line in vba code

Range("$M$3").Formula = Range("G3") & (",") & Range("L3")

Dim Lastrow As Long

Application.ScreenUpdating = False

Lastrow = Range("L" & Rows.Count).End(xlUp).Row
Range("M4").FormulaR1C1 = Range("G4") & (",") & Range("L4")
Range("M4").AutoFill Destination:=Range("M4:M" & Lastrow)
ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True

Tags:

Vb Example