SUMPRODUCT with a condition to check ISBLANK in a separate column

Xiggie

New Member
Joined
Feb 23, 2022
Messages
12
Office Version
  1. 2013
Platform
  1. Windows
Hi all, I am completely lost with my conditions!

For column J I need a total that would be calculated by summing up values in column D divided by values in column H, but only for those lines that are not blank in column J.

It feels like this should be a combination of (IF(NOT(ISBLANK(J5:J54)) and =SUMPRODUCT(1/D5:D54, H5:H54) but I cannot wrap my head around the way to do it.
I am also too far down this rabbit hole to change the logic of the rest of the spreadsheet.

Any suggestions would be very welcome!


Mercenaries Ledger.xlsm
DEFGHIJKLMN
4How much - TotalHow manyWho Sold#Person 1Person 2Person 3Person 4Person 5
53,000,000.00 ₽1Person 15xxxxx
6 00
7100,000.00 ₽1Person 22xx
8250,000.00 ₽1Person 31x
9 00
10 00
11  
12  
13  
14  
54  
55 
563,350,000.00 ₽- 2,350,000.00 ₽550,000.00 ₽600,000.00 ₽600,000.00 ₽600,000.00 ₽
Shared Expenses
Cell Formulas
RangeFormula
D54,D5:D14D5=C5*E5
H54:H55,H5:H14H5=IF(NOT(ISBLANK($B5)),COUNTA($J5:$AM5),"")
E56E56=SUMPRODUCT(C5:C54,E5:E54)
J56:N56J56=SUM(IF(NOT(ISBLANK(J5:J55)),(1/$H$5:$H$55)*$D$5:$D$55))-SUMIF($F$5:$F$55,J4,$D$5:$D$55)
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
'Shared Expenses'!_FilterDatabase='Shared Expenses'!$J$4:$Q$4J56
Header='Shared Expenses'!$J$4J56
Participants=OFFSET('Shared Expenses'!$J$4,,,,COUNTA('Shared Expenses'!$J$4:$AM$4))J56
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F9:F18Expression=AND(NOT(ISBLANK($B9)),ISBLANK($F9))textNO
F9:F18Expression=AND(ISERROR(MATCH(F9,$J$4:$AM$4,0)),NOT(ISBLANK(B9)))textNO
H9:H18Expression=ISBLANK(H9)textNO
J4:AM4Expression=AND(NOT(ISBLANK(I$4)),ISBLANK(J$4))textNO
J5:AM55Expression=AND(NOT(ISBLANK(J$4)),NOT(ISBLANK($B5)),$H5<1)textNO
J5:AM55Expression=AND(NOT(ISBLANK(J$4)),ISBLANK($B5))textNO
F5:F8,F43:F55Expression=AND(NOT(ISBLANK($B5)),ISBLANK($F5))textNO
J5:AM55Expression=AND(NOT(ISBLANK(J$4)),NOT(ISBLANK($B5)))textNO
F5:F8,F43:F55Expression=AND(ISERROR(MATCH(F5,$J$4:$AM$4,0)),NOT(ISBLANK(B5)))textNO
H45:H55,H5:H8Expression=ISBLANK(H5)textNO
J56:AM56,J57Expression=J56<0.009textNO
Cells with Data Validation
CellAllowCriteria
F5:F55List=Participants
J4:S4List=Mercenaries!$A$2:$A$1048576
J5:AM55List=Marks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You may have to array enter the formula.

SumProduct 2022a.xlsm
DEFGHIJKLMN
4
5TotalHow manyWho Sold#Person 1Person 2Person 3Person 4Person 5
63,000,000.001Person 15xxxxx
70
8100,000.001Person 22xx
9250,000.001Person 31x
100
110
123,350,000.00650,000.00650,000.00850,000.00600,000.00600,000.00
13
1a
Cell Formulas
RangeFormula
D12D12=SUM(D6:D11)
J12:N12J12=SUM(IF(J6:J11<>"",$D$6:$D$11/$H$6:$H$11))
 
Upvote 0
no feedback
Another alternative to consider

SumProduct 2022a.xlsm
ABCDEFGHIJKLMN
4
5TotalHow manyWho Sold#Person 1Person 2Person 3Person 4Person 5
63,000,000.001Person 15600,000.00xxxxx
7 
8100,000.001Person 2250,000.00xx
9250,000.001Person 31250,000.00x
10 
11 
123,350,000.00650,000.00650,000.00850,000.00600,000.00600,000.00
13650,000.00650,000.00850,000.00600,000.00600,000.00
14
1a
Cell Formulas
RangeFormula
I6:I11I6=IF(H6>0,D6/H6,0)
J12:N12J12=SUM(IF(J6:J11<>"",$D$6:$D$11/$H$6:$H$11))
J13:N13J13=SUMIFS($I$6:$I$11,J6:J11,"x")
 
Upvote 0
Solution
no feedback
Another alternative to consider

SumProduct 2022a.xlsm
ABCDEFGHIJKLMN
4
5TotalHow manyWho Sold#Person 1Person 2Person 3Person 4Person 5
63,000,000.001Person 15600,000.00xxxxx
7 
8100,000.001Person 2250,000.00xx
9250,000.001Person 31250,000.00x
10 
11 
123,350,000.00650,000.00650,000.00850,000.00600,000.00600,000.00
13650,000.00650,000.00850,000.00600,000.00600,000.00
14
1a
Cell Formulas
RangeFormula
I6:I11I6=IF(H6>0,D6/H6,0)
J12:N12J12=SUM(IF(J6:J11<>"",$D$6:$D$11/$H$6:$H$11))
J13:N13J13=SUMIFS($I$6:$I$11,J6:J11,"x")

Hello and thank you! No feedback due to timezones!

Thank you very much for looking into this mess for me, I shall try to apply both solutions and see if I manage!
 
Upvote 0
Thank you!! This indeed was a solution. I was trying to work with trueblanks when I should have focused on a variable I can actually lock (x)!! Much appreciated!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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