Apply formula to the entire column

后端 未结 11 1318
不知归路
不知归路 2021-01-30 19:03

I\'m trying to recode all the zip code from Column A into Column B with the formula:

=TEXT(A1,\"00000\")

Like this:

相关标签:
11条回答
  • 2021-01-30 19:38

    You can use Ctrl+Shift+Down+D to add the formula to every cell in the column as well.

    Simply click/highlight the cell with the equation/formula you want to copy and then hold down Ctrl+Shift+Down+D and your formula will be added to each cell.

    0 讨论(0)
  • 2021-01-30 19:39

    To be clear when you us the drag indicator it will only copy the cell values down the column whilst there is a value in the adjacent cell in a given row. As soon as the drag operation sees an adjacent cell that is blank it will stop copying the formula down.

    .e.g

    1,a,b
    2,a
    3,
    4,a
    

    If the above is a spreadsheet then using the double click drag indicator on the 'b' cell will fill row 2 but not row three or four.

    0 讨论(0)
  • 2021-01-30 19:41

    Let's say you want to substitute something in an array of string and you don't want to perform the copy-paste on your entire sheet.

    Let's take this as an example:

    • String array in column "A": {apple, banana, orange, ..., avocado}
    • You want to substitute the char of "a" to "x" to have: {xpple, bxnxnx, orxnge, ..., xvocado}

    To apply this formula on the entire column (array) in a clean an elegant way, you can do:

    =ARRAYFORMULA(SUBSTITUE(A:A, "a", "x"))
    

    It works for 2D-arrays as well, let's say:

    =ARRAYFORMULA(SUBSTITUE(A2:D83, "a", "x"))
    
    0 讨论(0)
  • 2021-01-30 19:46

    I think it's a more recent feature, but it works for me:

    Double clicking the square on the bottom right of the highlighted cell copies the formula of the highlighted cell.

    Hope it helps.

    0 讨论(0)
  • 2021-01-30 19:49

    Just so I don't lose my answer that works:

    1. Select the cell to copy
    2. Select the final cell in the column
    3. Press CTRL+D
    0 讨论(0)
  • 2021-01-30 19:55

    This is for those who want to overwrite the column cells quickly (without cutting and copying). This is the same as double-clicking the cell box but unlike double-clicking, it still works after the first try.

    1. Select the column cell you would like to copy downwards
    2. Press Ctrl+Shift+ to select the cells below
    3. Press Ctrl+Enter to copy the contents of the first cell into the cells below

    BONUS:

    The shortcut for going to the bottom-most content (to double-check the copy) is Ctrl+. To go back up you can use Ctrl+ but if your top rows are frozen you'll also have to press Enter a few times.

    0 讨论(0)
提交回复
热议问题