|
- Sub 日期()
- Dim r, p As Integer
- r = Range("b65536").End(xlUp).Row
- p = Range("c65536").End(xlUp).Row
- If r < p Then
- Range("b" & r + 1 & ":b" & p) = [b1].Value
- End If
- End Sub
- Sub 增加行()
- With Sheets("中厨房采购直拨及领料")
- Set Rng = .Columns(1).Find("合 计", , , 1)
- If Not Rng Is Nothing Then
- rs = Rng.Row
- .Rows(rs & ":" & rs + 9).Insert Shift:=xlDown
- .Range(.Cells(rs - 1, "f"), .Cells(rs - 1, "i")).AutoFill Destination:=.Range(.Cells(rs - 1, "f"), .Cells(rs + 9, "i")), Type:=xlFillDefault
- End If
- k = Sheets("中厨房采购直拨及领料").Range("a65536").End(xlUp).Row - 1
- For i = 3 To k
- Range("a" & i) = i - 2
- Next
- End With
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- l = Range("a65536").End(xlUp).Row
- Range("h" & l) = Application.WorksheetFunction.Sum(Range("h3:h" & l - 1))
- End Sub
复制代码 |
|