views:

23

answers:

2

Hi,

Simple question:

I want to create a formula which, in column Cn, will compute the values of An * Bn.

example

column C1 = column A1 * column B1
column C2 = column A2 * column B2
column C3 = column A3 * column B3

...etc

all the way down to

column Cn = column An * column Bn

Thanks

+1  A: 

In what context are you trying to create a formula? If in VBA, you can do something like:

Range("A1").FormulaR1C1 = "=RC[-2]*RC[-1]"

This formula is in R1C1 format. It tells the system to take the value two columns to the left of the cell containing the formula and multiply it by the column to immediately to the left of the cell containing the formula. This same formula could be entered in all rows of column C and would automatically adjust based on the row.

Thomas
+1  A: 

Easy way to do it.

  1. Highlight your formula cell.
  2. The lower right corner should turn into a + sign.
  3. Click on that + sign and drag it for as many rows as you like.

Alternatively, you can do this:

  1. Highlight the formula cell.
  2. Ctrl+C to copy.
  3. Click on the C column.
  4. Hit enter.

Now with the second method, it may start to lock up on you because of the large number of cells it has to compute. Just hit escape and it'll go back to normal (but some cells may not be filled in, depending on how early you hit escape.)

Josh