How to write a function for column A = product of two columns, B a

W

wlfoote

How do I select all the cells in column A to be populated by the result of
the product of all the cells in two other columns, B and C.

In other words:

I would like A1:A10 = PRODUCT (B1:B10, C1:C10). However, the resultant ten
values ends up cell A1, not cells A1:A10.
 
T

T. Valko

Several ways...

Enter in A1:

=B1*C1

Drag copy down to A1

Or...

Select the range A1:A10 starting from cell A1.

Enter in A1:

=B1*C1

Hold down the CTRL key then hit ENTER

Or...

Select the range A1:A10 starting from cell A1.

Enter in A1:

=B1:B10*C1:C10

Hold down both the CTRL key and the SHIFT key then hit ENTER
 
D

David Biddulph

You need to decide what you want.

If, as you say, you want *all* the cells in column A to be populated by the
result of the product of *all* the cells in two other columns, B and C,
then in A1 you can put the formula
=PRODUCT(B$1:B$10, C$1:C$10)
and then fill the formula down (using the fill handle in the bottom
right-hand corner of the cell) through A2:A10 to get the same result in all
10 cells in A.

If, instead, you want *each of* the cells in column A to be populated by the
result of the product of *the corresponding* cells in two other columns, B
and C, then in A1 you can put the formula
=PRODUCT (B1, C1) or just =B1*C1,
and then fill the formula down through A2:A10 to get the appropriate
results in A2:A10.

If, rather than either of those, you want one result in column A to be the
*sum* of the B*C products, the formula is
=SUMPRODUCT(B1:B10,C1:C10)
 
W

wlfoote

wlfoote said:
How do I select all the cells in column A to be populated by the result of
the product of all the cells in two other columns, B and C.

In other words:

I would like A1:A10 = PRODUCT (B1:B10, C1:C10). However, the resultant ten
values ends up cell A1, not cells A1:A10.

Best answer (from two posts) was:

Select the range A1:A10 starting from cell A1.

Enter in A1:

=B1:B10*C1:C10

Hold down both the CTRL key and the SHIFT key then hit ENTER
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top