- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 22# slip
¸Õ¸Õ¬Ý¡I- Sub duplicate_Click()
- Dim nextRows As Single
-
- With Sheets("Sheet1")
- nextRows = .Range("A" & Rows.Count).End(xlUp).Row + 1
- .Range("A" & nextRows & ":AH" & .UsedRange.Rows.Count).ClearContents
-
- .Range("A" & nextRows & ":E" & nextRows).Value = Sheets("Sheet1").[A2:E2].Value ' A-E
- .Range("I" & nextRows & ":AH" & nextRows).Value = Sheets("Sheet1").[I2:AH2].Value ' I-AH
- .Cells(nextRows, 6).Formula = "=C" & nextRows & "-P" & nextRows ' F
- If .Cells(nextRows, 6).Value < 0 Then .Cells(nextRows, 6).Font.Color = 1
- .Cells(nextRows, 7).Formula = "=D" & nextRows & IIf(nextRows = 3, "", "-D" & nextRows - 1) ' G
- If .Cells(nextRows, 7).Value < 0 Then .Cells(nextRows, 7).Font.Color = 1
- .Cells(nextRows, 8).Formula = "=E" & nextRows & IIf(nextRows = 3, "", "-E" & nextRows - 1) ' H
- If .Cells(nextRows, 8).Value < 0 Then .Cells(nextRows, 8).Font.Color = 1
- End With
- End Sub
½Æ»s¥N½X
|
|