Here's a general method for copying a formula from one cell to many. I'll pretend you're copying that value 1 that Peco told you about, but it'll work with anything.
Let's say you have continuous data (ie no empty cells) in column A, running from row 2 down to row 99 999. You want to create a 1 in B2:B99999. Do this:
- Enter 1 in B2.
- Copy B2. I usually do that by hitting <Ctrl-Ins>, because I'm a grizzled old Windows user; but you can use <Ctrl-C>, or <Alt-H>,C, or mouse to the Copy icon, or whatever pleases you.
- Now there's a dotted line blinking around B2, showing that it's ready to be copied somewhere. Don't complete the copy yet; just hit <Left> on in some other way move the cursor to A2, or indeed to anywhere between A2 and A99999.
- Hit and release the <End> key.
- Hit and release the <Down> key.
- If there were no empty cells between A2 and A99999, you're now at the last cell in the range, ie A99999. Hit <Right> or in some other way move the selection one column to the right, back to B99999.
- Hold down the <Shift> key.
- While still holding down <Shift>, strike and release <End>
- Still not releasing <Shift>, strike and release <Up>.
- You're now back at B2 where you started, but you have the whole range B2:B99999 selected—and B2 still has the blinking border around it indicating that it's ready to be copied. So hit <Enter> to copy B2 to the whole range B2:B99999. (The fact that it'll copy over itself is of no consequence.
There, it's done. I took 10 careful steps to describe the whole thing, but if you know all the keystrokes you can collapse them mentally into just this:
- Copy the formula at the top.
- Move to your index column and <End><Down> to the bottom of the range.
- Move back to your formula column and <Shift-<End,Up>> to the top again.
- Complete the copy with <Enter>.
This obviates having to scroll down and up a long, long time. But it depends on there being at least one column in your data that is unbroken from top to bottom.