Make =Sumproduct ignore blank cells instead of returning "#VALUE!"

LilMill

New Member
Joined
Jan 3, 2020
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Tinglev rute.xlsx
DEFGHIJKLMN
21 varm1 varm1 varm1 varm1 kold1 varm#VALUE!#VALUE!#VALUE!
31 varm1 varm1 varm1 varm00040260,00 kr.
42 kold2 kold2 kold0001 varm16455,00 kr.
51 varm1 varm1 varm1 varm1 varm1 varm1 varm70455,00 kr.
Uge
Cell Formulas
RangeFormula
L2:L3L2=SUMPRODUCT((RIGHT(D2:J2,4)=$L$1)*(LEFT(D2:J2,1)))
M2M2=SUMPRODUCT((RIGHT(D2:J2,4)=$M$1)*(LEFT(D2:J2,1)))
N2:N5N2=SUM(L2:M2)*65
M3:M5M3=SUMPRODUCT((RIGHT(D3:J3,4)=$M$1)*(LEFT(D3:J3,1)))
L4:L5L4=SUMPRODUCT((RIGHT(D4:J4,4)=$L$1)*(LEFT(D4:J4,1)))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Still nothing
 

Attachments

  • ****.png
    ****.png
    31.2 KB · Views: 9
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
what about that=SUMPRODUCT(IF(($D2:$J2)<>0,(RIGHT($D2:$J2,4)=$L$1)*(LEFT($D2:$J2,1)),""))
 
Upvote 0
Try this, copied across and down (may need to change commas to semicolons?)

A_MrExcel.xlsm
DEFGHIJKLM
1VarmKold
21 varm1 varm1 varm1 varm1 kold1 varm51
31 varm1 varm1 varm1 varm00040
42 kold2 kold2 kold0001 varm16
51 varm1 varm1 varm1 varm1 varm1 varm1 varm70
SP
Cell Formulas
RangeFormula
L2:M5L2=SUMPRODUCT((RIGHT($D2:$J2,4)=L$1)*(LEFT(0&$D2:$J2,2)))
 
Upvote 0
Both did work now, but instead of “#VALUE!” It says “#NAME?”
 
Upvote 0
just a thought...what if you wrapped the whole formula with "=IFERROR(SUMPRODUKT(HVIS(($D2:$J2)<>0;(HØJRE($D2:$J2,4)=$L$1)*(VENSTRE($D2:$J2,1)))),"")
 
Upvote 0
If you are using a Danish version try Peter's formula like
=SUMPRODUKT((HØJRE($D2:$J2;4)=L$1)*(VENSTRE(0&$D2:$J2;2)))
 
Upvote 0
You're welcome & thanks for the feedback.
But it's Peter_SSs formula, I just translated it :)
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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