Board logo

標題: 不確定格子向下填滿 [打印本頁]

作者: d8722468    時間: 2016-3-15 22:01     標題: 不確定格子向下填滿

請教各位前輩,小弟知道自已寫的句子,可以在有A欄有值情形下,
可以在尾欄下拉自動填滿
但是會遇到的情形並不一定會是在A欄有值
也許會是在E或 F或不確定某欄會出現第一欄


取第一格的列 = Selection.Row
取第一格的數量 = Selection.Count

With Selection.Resize(Range("A1").CurrentRegion.Rows.Count + 1 - 取第一格的列, 取第一格的數量)
   '這一句小弟想破頭也不會~~~請各位大大指導

     .FillDown
    ActiveSheet.Range("A1").CurrentRegion.Calculate
    .Copy
    .PasteSpecial Paste:=xlPasteValues
   
End With




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)