#VALUE! Error of SUMPRODUCT if cell value is ""

nuficek

Board Regular
Joined
Jul 20, 2016
Messages
54
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a table calculating times based on several criteria. I have a problem with calculation if one of the cells in the criteria range (B2:B1000) is "" then I get #VALUE! Error. The following is sample table (real table has more than 1000 rows) and in this case B7 is empty cell value:

=SUMPRODUCT(--(YEAR(A2:A1000)=B1),(B2:B1000))<strike></strike>2018
=IF(D2="","",D2)3:155.6.2017
=IF(D3="","",D3)
<strike></strike>
1:1215.9.2017
=IF(D4="","",D4)
<strike></strike>
2:146.1.2018
=IF(D5="","",D5)
<strike></strike>
0:5515.2.2018
=IF(D6="","",D6)
<strike></strike>
4:0620.4.2018
=IF(D7="","",D7)
=IF(D8="","",D8)
<strike></strike>
2:1628.7.2018
=IF(D9="","",D9)
<strike></strike>
1:2030.10.2018
=IF(D10="","",D10)
<strike></strike>
3:153.2.2019

<tbody>
</tbody>
.
.
.
etc.

I tried a couple of solution but I can't get it working without error. I tried to use
<>"" or LEN function but still receiving the error. I would appreciate any help or suggestion.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
how about
=SUMPRODUCT(--(YEAR(D2:D10)=B1),(B2:B10))
 
Upvote 0
Thanks a lot for your reply, it will definetlly work. But I need to work with data as the table is much more complex. So I was trying to find out the solution wich would help me a lot. If there won't be a soultion I will use some hidden cells using your solution.
 
Upvote 0
It's impossible to tell if there is another solution, without seeing an accurate representation of your data.
From what you posted, col A is redundant as it's only showing what already exists in col D.
 
Upvote 0
I could use your solution but the first part of the table (500 entries) was using direct entry. And then there was temporary table used for import data using column D. That's also one reason why it's complicated to use your solution. Only chance would be to copy all old entries to this temporary one used for import and then it will work. And it seems to be now the easiest solution. Fluff, I can PM you the table if you want.
 
Upvote 0
As this is a public board, you will need to post the table to the thread, or upload to a share site & post the link here.
That way other members can offer assistance, should they so wish.
 
Upvote 0
Unfortunately I can't provide the entire table as it's data sensitive and it's too complex to simplify it and keep full functionality. But you are right that the data in
column A is redundant. I know that the problem is that SUMPRODUCT can't work with text but I can't sort it out.
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,058
Members
448,940
Latest member
mdusw

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