- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# ÂŤÑÄR¦À - Option Explicit
- Sub Ex()
- 'With ³¯z¦¡ : ¤@Óª«¥ó©Î¨Ï¥ÎªÌ¦Ûq«¬ºAªº¦WºÙ
- With Range("D6")
- .FormulaR1C1 = "=RC[-1]/2"
- If .Cells.End(xlDown).Row = Cells(Rows.Count, .Column).End(xlUp).Row Then
- '¸ê®Æ°Ïªº¸ê®Æ¨S¤¤Â_¦³³sÄò,¥i±q¤W©¹¤U¨ì¸ê®Æ°Ïªº³Ì«á¤@µ§¸ê®Æ
- ' .Cells.End(xlDown) *** ¦³¤@ÂI .Cells ¬O Withª«¥óªº Cells ***
- .AutoFill Destination:=Range(.Cells, .Cells.End(xlDown))
- Else
- '¸ê®Æ°Ïªº¸ê®Æ¦³ªÅ¥Õ¸ê®Æ,¥²»Ý¥Ñ¤u§@ªí©³³¡¥Ñ¤U©¹¤W¨ì¸ê®Æ°Ïªº³Ì«á¤@µ§¸ê®Æ
- '** Cells(Rows.Count, .Column) ** -> Cells(¤u§@ªíªº¦C¦ìÁ`¼Æ, Range("D6")ªºÄæ¦ì¼Æ)
- '** Cells³o¸Ì¨S¤@ÂI . ¬O¤u§@ªíªº Cells ¤£¬ORange("D6")ªº Cells**
- '** ¦³¤@ÂI .Column ¬ORange("D6")ªº Äæ¦ì **
- .AutoFill Destination:=Range(.Cells, Cells(Rows.Count, .Column).End(xlUp))
- End If
- End With
- End Sub
½Æ»s¥N½X |
|