返回列表 上一主題 發帖

[發問] 按鈕使用問題

[發問] 按鈕使用問題

用"0"一個按鈕能否同時把"B"內容copy到"A"和"D"內容copy到"C",請指教...謝謝


Sub 按鈕0_Click()

    For i = 1 To 10
        Cells(i, "A").Value = Cells(i, "B").Value
    Next i

End Sub

謝謝版主指導,成功了是可以的。

TOP

Sub 按鈕0_Click()

    For i = 1 To 10
        Cells(i, "A").Value = Cells(i, "B").Value
        Cells(i, "C").Value = Cells(i, "D").Value
        Cells(i, "E").Value = Cells(i, "F").Value
        Cells(i, "G").Value = Cells(i, "H").Value
        Cells(i, "I").Value = Cells(i, "J").Value
        Cells(i, "K").Value = Cells(i, "L").Value
    Next i

End Sub

以上公式進行覆製時時間較耐,有方法解決嗎?謝謝

TOP

Sub 按鈕0_Click()

    For i = 19 To 44
        Cells(i, "H").Value = Cells(i, "L").Value
        Cells(i, "N").Value = Cells(i, "R").Value
        Cells(i, "T").Value = Cells(i, "X").Value
        Cells(i, "Z").Value = Cells(i, "AD").Value
        Cells(i, "AF").Value = Cells(i, "AJ").Value
        Cells(i, "AL").Value = Cells(i, "AP").Value
    Next i
        
End Sub

謝謝register313的回覆,如我把欄和列改變了,應怎樣修改公式?

TOP

回復 7# Hsieh


    謝謝Hsieh版主回覆,很清楚解釋修改方法,這覆製動作需時9秒完成,有更快完成的方法嗎?

TOP

回復  笨小孩
不會吧!要用到9秒?
應該是你工作表公式非常複雜才會如此耗時
Hsieh 發表於 2011-12-18 21:53



    文件只有600k,覆製資料時cpu損耗資源50%以上,應該是硬件資源不足的問題。

TOP

        靜思自在 : 一句溫暖的話,就像往別人身上灑香水,自己會沾到兩三滴。
返回列表 上一主題