how can I simultaneously divide each corresponding cells of two columns and sum all the results by ignoring blank cells

kiran5388

Board Regular
Joined
Sep 7, 2021
Messages
62
Office Version
  1. 365
Platform
  1. Windows
how can I simultaneously divide each corresponding cells of two columns and sum all the results by ignoring blank cells.

Please find the screenshot.
B12=SUMPRODUCT(1/A9:A11,B9:B11)
B19=SUMPRODUCT(NOT(ISBLANK(A16:A18)),1/A16:A18,B16:B18) - not the expected result

Thanks in Advance.

1631014817550.png
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the MrExcel board!

Is this what you want?

21 09 07.xlsm
ABCD
1
2243
36
422
Divide
Cell Formulas
RangeFormula
D2D2=SUM(FILTER(B2:B4,A2:A4<>0)/FILTER(A2:A4,A2:A4<>0))
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
How can I get the result using Product 1 criteria in Below Screenshot.?
1631029534851.png
 

Attachments

  • 1631029462293.png
    1631029462293.png
    27.3 KB · Views: 0
Upvote 0
How about
Excel Formula:
=SUM(FILTER(C1:C5,(C1:C5<>0)*(A1:A5="Product1"))/FILTER(B1:B5,(C1:C5<>0)*(A1:A5="Product1")))
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
What about
Excel Formula:
=SUM(FILTER(C1:C5/B1:B5,(C1:C5<>0)*(A1:A5="Product1")))

.. and a similar simplification for the original question
Excel Formula:
=SUM(FILTER(B2:B4/A2:A4,A2:A4<>0))
 
Upvote 0
What about
Excel Formula:
=SUM(FILTER(C1:C5/B1:B5,(C1:C5<>0)*(A1:A5="Product1")))

.. and a similar simplification for the original question
Excel Formula:
=SUM(FILTER(B2:B4/A2:A4,A2:A4<>0))
this "=SUM(FILTER(C1:C5/B1:B5,(C1:C5<>0)*(A1:A5="Product1")))" will be div/0 if denominator is 0 in any of the cell i.e in B column. Therefore the correct formula is "=SUM(FILTER(C1:C5/B1:B5,(B1:B5<>0)*(A1:A5="Product1")))"

The original question answer is perfectly fine. Thank you.
I learnt something new.
 
Upvote 0

Forum statistics

Threads
1,215,348
Messages
6,124,425
Members
449,157
Latest member
mytux

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