Excel マクロのオートフィルについて Excelのマクロで A2にある関数とP2にある関数とQ2にある関数を オートフィルしたい場合 Range("A2").Select With Cells(Rows.Count, "A").End(xlUp) Selection.AutoFill Destination:=Range(Selection, Cells(.Row, "A")), Type:=xlFillCopy End With Range("P2").Select With Cells(Rows.Count, "A").End(xlUp) Selection.AutoFill Destination:=Range(Selection, Cells(.Row, "P")), Type:=xlFillCopy End With Range("Q2").Select With Cells(Rows.Count, "A").End(xlUp) Selection.AutoFill Destination:=Range(Selection, Cells(.Row, "Q")), Type:=xlFillCopy End With としていますが、もっとスマートな構文があるかと思います。 ご指南ください。
Excel