formula search, match, maeby sumproduct to get SUM if...?

drom

Well-known Member
Joined
Mar 20, 2005
Messages
546
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and Thanks in advance!!

Check the attached Image

On the range D16:D24, I would like to have a formula (No UDF)
  • To get the expected results see Yellow ($D$16:$D$24)

I have named the ranges I guess I am gonna need (see range("$H$17:$I$21")

Book2
ABCDEFGHIJKLM
1
2Project ID'S
3P1P2P3P4P5P6P7TOTAL
4
515617324918015698981.110
6
7Proy NºNameP1 PERSONALP2 ACT - MANTP3 KIOP4 GEST - ADMP5 INVP6 ZZZP7 No ImpTOTAL
8Pr01AAAAA4973310611052222
9Pr03BBBBBB10652089184
10Pr04CCC154833011143
11Pr059524023160
12Pr07DDD8267668065446401
13Pr150
14
15Pssible ProjectsProject IDAmount
16Pr03, Pr04P3148=F9+F10
17Pr03, Pr04P125=D9+D10E3:K3ProjectIDs
18Pr03, Pr04P450=G9+G10B8:B13AA
19Pr03, Pr04, Pr07P271=E9+E10+E12C8:D13BB
20Pr04P611=I10
21Pr01, Pr04P440=G8+G10Table NameTable1
22Pr01, Pr03, Pr04, Pr07P3247=F8+F9+F10+F12
23Pr56x =""
24Pr7P45 =""
25
26
27
28
29
30
31
Sheet1
Cell Formulas
RangeFormula
D5D5=SUBTOTAL(9,Table1[P1 PERSONAL])
E5E5=SUBTOTAL(9,Table1[P2 ACT - MANT])
F5F5=SUBTOTAL(9,Table1[P3 KIO])
G5G5=SUBTOTAL(9,Table1[P4 GEST - ADM])
H5H5=SUBTOTAL(9,Table1[P5 INV])
I5I5=SUBTOTAL(9,Table1[P6 ZZZ])
J5J5=SUBTOTAL(9,Table1[P7 No Imp])
K5K5=SUBTOTAL(9,Table1[TOTAL])
K8:K13K8=SUM(Table1[@[P1 PERSONAL]:[P7 No Imp]])
D16D16=F9+F10
E16:E24E16=FORMULATEXT(D16)
D17D17=D9+D10
D18D18=G9+G10
D19D19=E9+E10+E12
D20D20=I10
D21D21=G8+G10
D22D22=F8+F9+F10+F12
D23:D24D23=""
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K8:K11Expression=and(A8<>K8;XEZ8<>$C$4)textNO
K12Expression=and(A11<>K12;XEZ11<>$C$4)textNO
Cells with Data Validation
CellAllowCriteria
D8:K13Whole number>=0




Thanks!
 
For 2021 version Spill out formula In D16
Excel Formula:
=LET(a,B8:B13,b,D3:J3,MAP(B16:B24,C16:C24,LAMBDA(x,y,SUMPRODUCT(D8:J13*((ISNUMBER(FIND(a,x)))*(b=y))))))
For other versions formula In D16, to be copied down till D24
Excel Formula:
=SUMPRODUCT($D$8:$J$13*((ISNUMBER(FIND($B$8:$B$13,$B16)))*($D$3:$J$3=$C16)))
 
Upvote 0
More precise Formulas
For 2021 version Spill out formula In D16
Excel Formula:
=LET(a,B8:B13,b,D3:J3,MAP(B16:B24,C16:C24,LAMBDA(x,y,SUMPRODUCT(D8:J13*((ISNUMBER(FIND(", "&a&",",", "&x&",")))*(b=y))))))
For other versions formula In D16, to be copied down till D24
Excel Formula:
=SUMPRODUCT($D$8:$J$13*((ISNUMBER(FIND(", "&$B$8:$B$13&",",", "&$B16&",")))*($D$3:$J$3=$C16)))
 
Upvote 0
Solution
Xl 2021 does not have the Lambda functions.
 
Upvote 0

Forum statistics

Threads
1,226,840
Messages
6,193,277
Members
453,788
Latest member
drcharle

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