Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Jack P
Lv 5
Jack P asked in Computers & InternetSoftware · 8 years ago

Excel Autofill to a certain column?

I work a lot with very large worksheets. Some have hundreds of thousands of rows.

It happens quite that I have a column that I have to autofill a column from row 2 through row 279,495 (for example) and the columns around it have lots of empty cells so double-clicking the corner of the cell won't do it. So, I have been clicking and dragging and dragging and dragging and dragging... And it takes a really not time.

Do you know any tricks to do this faster?

Update:

*not time = long time

2 Answers

Relevance
  • 8 years ago
    Favorite Answer

    Here is one way using an event handler. You don't state your column letter, so this example uses column F. If your column is not 'F', change the "F" references to your column letter, i.e. "M", "K", etc.

    Then, copy the event handler below, modified if needed, to the clipboard (highlight the entire code, right click inside the highlighted area, and 'Copy'):

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    Range("F2").Select

    Selection.AutoFill Destination:=Range("F2:F279495"), Type:=xlFillDefault

    End Sub

    Select the worksheet containing your data and right click the sheet tab at the bottom.

    Select 'View Code'.

    Paste the event handler into the white editing area to the right (right click inside the area and 'Paste').

    Close the VBE (red button w/white 'x' - top right).

    Double click any cell.

  • saki
    Lv 4
    8 years ago

    You can simply use the function field at the top and type out your selection. $a2:$a279495. This will automatically select the rows you want.

    Source(s): Hope it helps
Still have questions? Get your answers by asking now.