Sub QR() For Each cell In Selection cell.Offset(0, 1).Select Dim imagepath As String imagepath = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & WorksheetFunction.EncodeURL(cell.Value) With ActiveSheet.Pictures.Insert(imagepath) .ShapeRange.ScaleWidth 0.8, msoFalse, msoScaleFromTopLeft .ShapeRange.ScaleHeight 0.8, msoFalse, msoScaleFromTopLeft End With Next cell End Sub