双击右下角的自动填充 [英] Double Click Bottom Right of Auto Fill
本文介绍了双击右下角的自动填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
似乎在这里是一个简单的问题,但是是否有代码可以模拟填充手柄右下角的双击?因此,我将从A,B和C列中选择3个单元格;并且自动填充功能应在A,B和C的所有空白内向下复制值,直到C中不再有空白为止.
seems like an easy question here, but is there a code to simulate the double clicking of bottom right of fill handle? So I would have 3 cells selected, from column A, B and C; and the autofill should duplicate the values inside down all the blanks in A, B and C till there is no more blank more blanks in C.
对此:
推荐答案
尝试一下:
Sub FillDown()
Dim rng As Range
Set rng = Range(Selection, Selection.End(xlDown))
Set rng = rng.Resize(rng.Rows.Count - 1, rng.Columns.Count)
rng.FillDown
End Sub
这篇关于双击右下角的自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文