How can I set a column equate a product of two columns?

  • Thread starter Thread starter z
  • Start date Start date
Z

z

How can I set a column equate a product of two columns?
For example, I need put the product of column A and B to column C, So that
when I input numbers to A and B, I can get their product in column C (
C=A*B)
thanks!
 
In cell C1 (Or whatever cell is the first data cell if you have column
headers etc) enter the following:-

=A1*B1

or if in cell C2 then:-

=A2*B2

Copy formula to bottom

Regards,

OssieMac
 
Thanks. But I still feel it is too much work to do as I have to copy and
past and modify each line when I input data.
What I expected is just set the formula for the column, so every time I fill
number to column A and B. I can get results in C automatically. Is this
possible?
Z
 
Enter this in C1.

=IF(AND(A1<>"",B1<>""),A1*B1,"")

Copy down as far as you wish.

To copy down, hover the mouse pointer over the bottom right corner of C1. You
will see a small black cross appear. This cross is known as the "Fill Handle"

Click on that and drag down the column.

The formula will increment automatically to

=IF(AND(A2<>"",B2<>""),A2*B2,"") etc.

If no numbers in A or B then the C will look blank until you enter numbers in A
and B


Gord Dibben MS Excel MVP
 
If you want to fill in the formula all the way down column C, but to show
blank instead of zero in the cases where A or B or both is empty, try
=IF(COUNT(A1:B1)=2,A1*B1,"")
 
That's great! Thank you!
Gord Dibben said:
Enter this in C1.

=IF(AND(A1<>"",B1<>""),A1*B1,"")

Copy down as far as you wish.

To copy down, hover the mouse pointer over the bottom right corner of C1.
You
will see a small black cross appear. This cross is known as the "Fill
Handle"

Click on that and drag down the column.

The formula will increment automatically to

=IF(AND(A2<>"",B2<>""),A2*B2,"") etc.

If no numbers in A or B then the C will look blank until you enter numbers
in A
and B


Gord Dibben MS Excel MVP
 
Back
Top