Having problem with Sumproduct formula

Jongnj87

New Member
Joined
Oct 16, 2020
Messages
32
Office Version
  1. 365
Platform
  1. Windows
Hello and good day everyone,

I have a table below for my sales return.

Everything was find until I used the Sumproduct formula on the O2. The formula I used was =SUMPRODUCT((B3:B31=N3)*H3:H31)

I realized that the range from 19 to 31 if nothing it will come out #VALUE!. However, if I range it down from 2 to 18, the formula worked!

I need help in the range if empty it will still calculate for me.


ABCDEFGHIJKLNO
1S/NoCustomer NameCodeItems PurchaseQTYRETAIL PRICE/PIECEDISCOUNTTotal CostPaymentDeliveryInvoiceRemarksSELECTED CUSTOMER NAMEACCUMULATED PURCHASE
21Rui XianBX68黑碧玺柱1$68.00
$68.00​
Rui Xian
#VALUE!​
32Ken TanHK8凯蒂猫吊坠3$8.00
$24.00​
43Seah Yuh LihZC20招财猫(金泰)1$20.00
$20.00​
54Rui XianMM8米老鼠(粉虎眼)1$8.00
$8.00​
65HX QiuSY8四叶草1$8.00
$8.00​
76Casey LimHL10海蓝宝(平安扣)1$10.00
$10.00​
87丽彬HL8黄水晶葫芦1$8.00
$8.00​
98Casey LimCQT20超七桶1$20.00
$20.00​
109Ping PongCQT20超七桶1$20.00
$20.00​
1110Ping PongMP68玛瑙聚宝盆1$68.00
$68.00​
1211Christine ChenBXX20碧玺牌 - 星星1$20.00
$20.00​
1312Casey LimBXA20碧玺牌 - 爱心1$20.00
$20.00​
1413Christine ChenHKB8黑曜石 - 凯蒂猫2$8.00
$16.00​
1514Christine ChenZJX20紫晶 - 星星1$20.00
$20.00​
1615Jasmine TayBXY20碧玺牌 - 圆1$20.00
$20.00​
1716Fiona LeeSY8四叶草1$8.00
$8.00​
1817Fiona LeeZZ10珍珠1$10.00
$10.00​
1918
2019
2120
2221
2322
2423
2524
2625
2726
2827
2928
3029
3130
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
If the blanks in column H contain formulas that return a blank then it will cause that error, in those cases you need to use
Excel Formula:
=SUMPRODUCT(--(B3:B31=N3),H3:H31)
or simpler,
Excel Formula:
=SUMIFS(H3:H31,B3:B31,N3)
Don't forget to make the ranges absolute if you're dragging the formula down the sheet.
 
Upvote 0
Solution
How about
Excel Formula:
=SUMPRODUCT(--(B3:B31=N3),H3:H31)
 
Upvote 0
If the blanks in column H contain formulas that return a blank then it will cause that error, in those cases you need to use
Excel Formula:
=SUMPRODUCT(--(B3:B31=N3),H3:H31)
or simpler,
Excel Formula:
=SUMIFS(H3:H31,B3:B31,N3)
Don't forget to make the ranges absolute if you're dragging the formula down the sheet.

It solved my problem. Thank You
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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