Multiplication in Excel if cell contains greater than 0

sgexcel321

New Member
Joined
May 13, 2022
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi, I am trying to multiply two cells if the cell is greater than 0.

Capture.GIF


Currently at the total price, I came up with a formula which I couldn't figure out how to make it work.

=IF(B13:V13>0, "B13:V13*B10:V10","")

Above is the formula that I am trying.
So for example, if items 1 - 21 is all of different price. The cell that contains 1 in each row will multiply with the correct price above.

I can do manually by doing the formula
=(B13*B10)+(C13*C10)+(D13*D10) and so on.....
But I just want to learn if there is a formula to firstly, check if the cell is greater than 0 and then multiply if its greater than 0.
After that having a total sum at the end in the Total Price cell.

Anyone can help?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi & welcome to MrExcel.
Why do you need to check if there is a number in B13:V13, you can just use
Excel Formula:
=SUMPRODUCT($B$10:$V$10,B13:V13)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
Why do you need to check if there is a number in B13:V13, you can just use
Excel Formula:
=SUMPRODUCT($B$10:$V$10,B13:V13)

Hi, I don't want to just copy and paste your formula and then its done and thanks by the way it worked perfectly.

May I ask where is the multiplication process in the formula?

Why is the cells fixed in the first requirements? $B$10:$V$10.

Just hope to learn something
 
Upvote 0
The 1st range is locked, with the 2nd one relative, so that you can just drag the formula down the column, rather than typing it in for every row.
May I ask where is the multiplication process in the formula?
It's what the function does. :)
 
Upvote 0
The 1st range is locked, with the 2nd one relative, so that you can just drag the formula down the column, rather than typing it in for every row.

It's what the function does. :)

Ah thanks. Learnt something new today
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,563
Messages
6,125,550
Members
449,237
Latest member
Chase S

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top