|
▼よこやん さん:
>-------------------------------------------------------------------------
>Dim LastRow As Long
>-------------------------------------------------------------------------
> Range("H2").Select
> ActiveCell.FormulaR1C1 = "=RC[-2]*RC[1]"
> Range("H2").Select
> LastRow = Range("G" & Rows.Count).End(xlUp).Row 'G列のラスト行の値
> Range("H2").Select
> Range("H2").AutoFill Destination:=Range("H2" & LastRow)
> Range("H2").Select
> Selection.Copy
結局、この部分は
With Range("G2", Cells(Rows.Count, "G").End(xlUp)).Offset(, 1)
.FormulaR1C1 = "=RC[-2]*RC[1]"
.Copy
End With
とまとめることができますね
|
|