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.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi, what is in Row 1 Columns L,M and N?
 
Upvote 0
excel.xlsx
DEFGHIJKLMN
1varmkold
21 varm1 varm1 varm1 varm1 kold1 varm51390
31 varm1 varm1 varm1 varm00040260
42 kold2 kold2 kold0001 varm14325
51 varm1 varm1 varm1 varm1 varm1 varm1 varm70455
LilMill
Cell Formulas
RangeFormula
L2:L5L2=SUMPRODUCT(IF((D2:J2)<>0,(RIGHT(D2:J2,4)=$L$1)*(LEFT(D2:J2,1))))
M2:M5M2=SUMPRODUCT(IF((E2:K2)<>0,(RIGHT(E2:K2,4)=$M$1)*(LEFT(E2:K2,1))))
N2:N5N2=SUM(L2:M2)*65
 
Upvote 0
excel.xlsx
DEFGHIJKLMN
1varmkold
21 varm1 varm1 varm1 varm1 kold1 varm51390
31 varm1 varm1 varm1 varm00040260
42 kold2 kold2 kold0001 varm14325
51 varm1 varm1 varm1 varm1 varm1 varm1 varm70455
LilMill
Cell Formulas
RangeFormula
L2:L5L2=SUMPRODUCT(IF((D2:J2)<>0,(RIGHT(D2:J2,4)=$L$1)*(LEFT(D2:J2,1))))
M2:M5M2=SUMPRODUCT(IF((E2:K2)<>0,(RIGHT(E2:K2,4)=$M$1)*(LEFT(E2:K2,1))))
N2:N5N2=SUM(L2:M2)*65
I cant get this to work
 
Upvote 0
Since the formula is the same for both adjectives (hot and cold / varm og kold), maybe you could consider using $ to change the cell reference.
excel.xlsx
DEFGHIJKLMN
1varmkoldresultater
21 varm1 varm1 varm1 varm1 kold1 varm51390 kr.
31 varm1 varm1 varm1 varm00040260 kr.
42 kold2 kold2 kold0001 varm16455 kr.
51 varm1 varm1 varm1 varm1 varm1 varm1 varm70455 kr.
LilMill
Cell Formulas
RangeFormula
L2:L5L2=SUMPRODUCT(IF(($D2:$J2)<>0,(RIGHT($D2:$J2,4)=$L$1)*(LEFT($D2:$J2,1))))
M2:M5M2=SUMPRODUCT(IF(($D2:$J2)<>0,(RIGHT($D2:$J2,4)=$M$1)*(LEFT($D2:$J2,1))))
N2:N5N2=SUM(L2:M2)*65
 
Upvote 0
Anmærkning 2020-02-21 042820.png
 
Upvote 0
Sorry I am not sure if it is because of the European semicolon formula ; instead of commas ,
try
=SUMPRODUKT(HVIS(($D2:$J2)<>0;(HØJRE($D2:$J2,4)=$L$1)*(VENSTRE($D2:$J2,1))))
 
Upvote 0

Forum statistics

Threads
1,216,153
Messages
6,129,176
Members
449,491
Latest member
maxim_sivakon

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