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
 
How about
Excel Formula:
=SUM(FILTER(C1:C5,(C1:C5<>0)*(A1:A5="Product1"))/FILTER(B1:B5,(C1:C5<>0)*(A1:A5="Product1")))
This 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")))"
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You never made any mention of col B being blank or 0. ;)
 
Upvote 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")))"
Since you specifically talked about blank (=0) cells in the original question & examples but did not mention or use such examples (for col B) in the second question, like Fluff, I assumed there would be no blank cells in col B. Helpers can only go on what they are told and/or shown. ?
 
Upvote 0
hi, Im using excel 365, using excel template and formulas I will be generating the dynamic data in .net. I am facing an issue with the formulas where "_xlws. " getting added to the formulas and the output result is wrong. For example :
Input formula is =IFERROR(SUM(FILTER($Q$16:Q25/$R$16:R25,$R$16:R25<>0)),0) and Output Formula is changed to =IFERROR(SUM(_xlws.FILTER(@$Q$16:Q25/@$R$16:R25,@$R$16:R25<>0))/100,0)
as a result answer 0 instead of 18.43.
Please find attached snip. Any help will be greatly appreciated. Thanks
1631439191879.png
 
Upvote 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.
Is there any alternative for Filter function for above formula? I have issue outputting using it.
 
Upvote 0
Can you expand on that? What is the specific issue? Perhaps example(s)?

the above link was my issue. I have only issue with the Filter function rest of the formula functions works well like SumProduct
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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