|
モルトさん、こんにちは。
こうかな?
Sub sheetclear()
Dim saikagyo As Integer
saikagyo = 150
With ActiveWorkbook.Worksheets(3)
Range(.Cells(10, 2), .Cells(saikagyo, 16)).ClearContents
.Cells(11, 11) = "=IF(I11="""","""",ROUNDDOWN(N11/$C$5,0))"
.Cells(11, 12) = "=IF(I11="""","""",ROUNDDOWN(N11/$C$5,0)*$C$5)"
.Cells(11, 13) = "=IF(I11="""","""",N11-L11)"
.Cells(11, 14) = "=IF(I11="""","""",G11+N10-J11)"
Range(.Cells(11, 11), Cells(11, 14)).Select
Selection.AutoFill Destination:=Range(.Cells(11, 11), .Cells(saikagyo, 14)), Type:=xlFillDefault
Range(.Cells(11, 11), .Cells(saikagyo, 14)).Select
End With
End Sub
|
|