Sumif table

himurah182

New Member
Joined
Aug 4, 2022
Messages
21
Office Version
  1. 2019
Platform
  1. Windows
Hey guys,
I need your help on this one. I have a table (1st picture) that is going to be filled with the quantities of each product that were sold to each customer.
However, to be more specific, I need a second table(2nd picture) that calculates the total cost that each customer had in each type of product.
My goal with this excel file is to fill column "D" with data, next I would register and once it was done, the sum of each customers goods that were bought would appear in the second table.
I have tried to do a sumif, but it did not work properly since the function moved everytime a new column of data was registed.
Picture 3 has the unit prices of each product.
What should I do?
1660042032705.png
1660041913008.png
1660042329687.png
 
You can also try this, if you want to keep formula and outlook simple.

All Records.xlsb
OPQRSTUV
1Where codeBP MAIO 2022type 1type 2type 3type 4type 5
2Postos/vendasClipper RelogiosBorda d'ÁguaRestantes ArtigosTubos Total
326253Cacem-Av B Amigos0.450.000.000.000.000.45
426507Santarem/ nascente0.000.000.000.000.000.00
526800Santarem/poente0.000.000.000.000.000.00
627036Almada V.R.-Norte0.000.000.000.000.000.00
727037Almada V.R.-Sul32.4868.7588.958.0010.10208.28
827004Pêro Pinheiro0.000.000.000.000.000.00
927008Ic 19-Poente0.000.000.000.000.000.00
1027078Ramalhão32.4868.7588.958.0010.10208.28
1127114Mealhada-Nascente0.000.000.000.000.000.00
1227115Mealhada-Poente0.000.000.000.000.000.00
1327168Santarem -Variante0.000.000.000.000.000.00
1427406Duarte Pacheco0.000.000.000.000.000.00
1527311A21-Mafra Nasc/N0.000.000.000.000.000.00
1627312A21-Mafra Poen/S0.000.000.000.000.000.00
1727088Aeroporto0.000.000.000.000.000.00
1827020Albufeira V. R.0.000.000.000.000.000.00
1927010Amadora0.000.000.000.000.000.00
2027011Amadora II-Funch.0.000.000.000.000.000.00
2127006Areeiro0.000.000.000.000.000.00
2227145Braga-31 Janeiro0.000.000.000.000.000.00
Sheet2
Cell Formulas
RangeFormula
Q3:U22Q3=SUMPRODUCT($D$8:$D$78*$F$8:$H$78*($A$8:$A$78=Q$1)*($F$6:$H$6=$O3))
V3:V22V3=SUM(Q3:U3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
Q:VCell Value=0textNO
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi there
Thank you for the formula but it appears to not be working.
What did I do wrong?
Sheet1= 1st picture
BP MAIO 2022 = 3rd picture
calc3 (2).xlsm
ABCDEF
1
2
3E84/(1+$E$82)
4
5Fatura
6Where code2625326253
7PluProdutoPreço UndCacem-Av B AmigosCacem-Av B Amigos
8type 1103581RPBLACK2-BLACK ULTRA THIN 1,1/40,442939882
9type 1103582RPBLACK3-BLACK KING SIZE0,48293507
10type 1103583BOLSA FILTROS REGULAR-8MM-30B-100F0,470246770
11type 1103584BOLSA FILTROS SLIM-6MM-34B-120F0,422443546
12type 1103585ISQUEIRO CLIPPER PEQ. CP22RH0,592202319
13type 1103586ISQUEIRO CLIPPER PEQ FUN1,726836445
14type 1103587ISQUERIRO CLIPPER GRD CP11RH0,678054932
15type 1103902ISQUEIRO CLIPPER CLASS.METAL LARG CAIXA6,585374263
16type 1103903BOLSA FILTROS LONG SLIM-6MM-30B-100F0,543419264
17type 1103904BOLSA FILTROS LONG REGULAR-8MM-20B-100F0,54341889
18type 1105457ISQUEIRO Clipper Classic POP CPR11H1,71220918
19type 1106629ISQUEIRO MINI CLIPPER TUBE0,897566845
20type 1106630PAPEL CLIPPER BLUE ULTRA THIN REGULAR0,35122949
21type 1106631PAPEL CLIPPER PURE ULTRA THIN REGULAR0,351228863
22type 1106632PAPEL CLIPPERPURE ULTRA THIN KSS0,5317128100
23type 1106633PAPEL CLIPPER RED REGULAR CLASSIC0,329762137
24type 1106634PAPEL CLIPPER GREEN CUT CORNERS REGULAR0,329764128
25type 1106636MÁQUINA ENROLAR1,655613172
26type 1106637FILTROS POP UP EXTRA SLIM0,66829840
27type 1106638MEN-FILTROS POP UP EXTRA SLIM MENTOL0,74439852
28type 1106639FILTROS SLIM ORGANIC BOLSA0,632202266
29type 1107670SET KING SIZE SLIM+FILTROS DE PAPEL0,839025161
30type 1116773PAPEL RAW ORG HEMP KING SIZE SLIM0,560983758
31type 1116775PAPEL RAW CLASSIC KING SIZE SLIM0,531713970
32type 1116774PAPEL RAW ORG REGULAR0,37561687
33type 1116776FILTROS RAW ORGANIC SLIM0,634154170
34Type 2103588RELÓGIO Medium Price16,780491945
35Type 2103589RELÓGIO Low Price13,41463837
36Type 2103905RELOGIO ANALOGICO26,878053143
37Type 2106640SMARTWATCH SAMI44,770737633
38Type 3106506CIGARREIRA CAIXA PLASTICO2,585375567
39Type 3106506CIGARREIRA SILICONE2,585374067
40Type 3106661Cigarreira Cartão2,585379057
41Type 3106506CIGARREIRA CAIXA METAL2,585372417
42Type 3103906LINHA PORTUGAL PORTA MOEDAS3,307323881
43Type 3103907LINHA PORTUGAL ESTOJO4,3804910064
44Type 3103908LINHA PORTUGAL CARTEIRA 25,551221064
45Type 3103909LINHA PORTUGAL CARTEIRA5,551224026
46Type 3103910CARTEIRA PRIMAVERA C/FECHO 119 BAND5,512203311
47Type 3103911CARTEIRA PRIMAVERA GRANDE 1104,38049416
48Type 3103912CARTEIRA PRIMAVERA PEQUEÑA 1113,951224953
49Type 3103913MATRAFONA GIGANTE11,170737373
50Type 3103914BLOCO NOTAS1,570738343
51Type 3103915PULSERIRA PELE COM CAIXA12,282939555
52Type 3103916LICOREIRA CORTIÇA6,682932419
53Type 3103917PULSEIRAS CORTIÇA6,682939276
54Type 3103918COLARES CORTIÇA7,795128795
55Type 3103919CANETA CORTIÇA COM CAIXA5,551222598
56Type 3106507PELUCHE TAM 110,03902528
57Type 3106508PELUCHE TAM 315,658546966
58Type 3106509OCULOS SOL15,307325313
59Type 3106641CARTAS JOGAR PLÁSTICO5,073177762
60Type 3106642CARTEIRA GB SRA PELE24,634154974
61Type 3106643CARTEIRA GB HM PELE-PEQ14,526833465
62Type 3106644CARTEIRA GB HM PELE- GR16,780497443
63Type 3106645SACA ROLHAS CORTIÇA2,78049945
64Type 3106654CIGARREIRAS CORTIÇA5,609761110
65Type 3106655MINIATURA V. PORTO/LICOR BEIRÃO3,365856651
66Type 3106656CONJ 2 MINIATURAS PORTO+BEIRÃO5,073176067
67Type 3106657PORTA MOEDAS PEQ CORTIÇA-VÁRIOS MODELOS4,439021550
68Type 3106658PORTA MOEDAS DA AVÓ-CORTIÇA7,707327156
69Type 3106659PORTA MOEDAS HM -CORTIÇA8,926837479
70Type 3106660PORTA MOEDAS MOCHILA CORTIÇA5,902447345
71Type 3107671PUZZLES- SORTIDOS3,365852678
72Type 3107672JOGO TABULEIRO-SORTIDO6,14634444
73Type 3107673OVO DINOSSAURO3,082932228
74Type 3107674CONJ CORTIÇA11,170737761
75type 4103804BORDA D'ÁGUA1,560983154
76type 5114755TUBOS T&T 500 UND1,970738996
77type 5115903TUBOS KORONA 300 UND1,094632941
78type 5115902TUBOS KORONA 500 UND1,970739078
Sheet1
Cell Formulas
RangeFormula
E6E6=IFNA(INDEX(Sheet2!B3:B215,MATCH(Sheet1!E7,Sheet2!C3:C215,0)),"")
D8:D78D8=E84/(1+$E$82)
E8:E78E8=RANDBETWEEN(1,100)
Cells with Data Validation
CellAllowCriteria
E7:F7List=Sheet2!$D$3#

calc3 (2).xlsm
ABCDEFG
1Where codeBP MAIO 2022type 1type 2type 3type 4type 5
2Postos/vendasClipper RelogiosBorda d'ÁguaRestantes ArtigosTubos
326253Cacem-Av B Amigos     
426507Santarem/ nascente     
526800Santarem/poente     
627036Almada V.R.-Norte     
727037Almada V.R.-Sul     
827004Pêro Pinheiro     
927008Ic 19-Poente     
1027078Ramalhão     
1127114Mealhada-Nascente     
1227115Mealhada-Poente     
BP MAIO 2022
Cell Formulas
RangeFormula
C3:G12C3=IF(SUMPRODUCT(Sheet1!$D$8:$D$78*Sheet1!$G$8:$H$78*(Sheet1!$A$8:$A$78='BP MAIO 2022'!Q$1)*(Sheet1!$G$6:$H$6='BP MAIO 2022'!$O3))=0,"",SUMPRODUCT(Sheet1!$D$8:$D$78*Sheet1!$G$8:$H$78*(Sheet1!$A$8:$A$78='BP MAIO 2022'!Q$1)*(Sheet1!$G$6:$H$6='BP MAIO 2022'!$O3)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:G3,F4:G217,C4:E215Cell Value<0textNO
 
Upvote 0
See there is a particular challenge with SUMPRODUCT Function -
If you are making multiple conditions, each condition needs to be properly bracketed separately.

Also when you write/use Long Sheet name like yours BP MAIO 2022 it is advised to use _ as a connector to avoid any error while Referring to a sheet - So change sheet name to BP_MAIO_2022 in case you need that long - Using spaces in Sheet name is invitation to errors.

You wrote -
Excel Formula:
=SUMPRODUCT(Sheet1!$D$8:$D$78*Sheet1!$G$8:$H$78*(Sheet1!$A$8:$A$78='BP MAIO 2022'!Q$1)*(Sheet1!$G$6:$H$6='BP MAIO 2022'!$O3)

But it needs to be -
Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78='BP_MAIO_2022'!Q$1)*(Sheet1!$G$6:$H$6='BP_MAIO_2022'!$O3))

First try the above then further add IF conditions to it.
Also, remember to change Sheet name in above formula in case you change it.

Try it and tell

Best wishes
 
Upvote 0
See there is a particular challenge with SUMPRODUCT Function -
If you are making multiple conditions, each condition needs to be properly bracketed separately.

Also when you write/use Long Sheet name like yours BP MAIO 2022 it is advised to use _ as a connector to avoid any error while Referring to a sheet - So change sheet name to BP_MAIO_2022 in case you need that long - Using spaces in Sheet name is invitation to errors.

You wrote -
Excel Formula:
=SUMPRODUCT(Sheet1!$D$8:$D$78*Sheet1!$G$8:$H$78*(Sheet1!$A$8:$A$78='BP MAIO 2022'!Q$1)*(Sheet1!$G$6:$H$6='BP MAIO 2022'!$O3)

But it needs to be -
Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78='BP_MAIO_2022'!Q$1)*(Sheet1!$G$6:$H$6='BP_MAIO_2022'!$O3))

First try the above then further add IF conditions to it.
Also, remember to change Sheet name in above formula in case you change it.

Try it and tell

Best wishes
In fact I just noticed you are working on sheet BP MAIO 2022 only so actual formula should be

Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78=Q$1)*(Sheet1!$G$6:$H$6=$O3))
 
Upvote 0
In fact I just noticed you are working on sheet BP MAIO 2022 only so actual formula should be

Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78=Q$1)*(Sheet1!$G$6:$H$6=$O3))
I just checked cell references are also wrong -

=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78=Q$1)*(Sheet1!$G$6:$H$6=$O3))

(Sheet1!$A$8:$A$78=Q$1) - It should be from (Sheet1!$A$8:$A$78=C$1)

(Sheet1!$G$6:$H$6=$O3) - It should be (Sheet1!$F$6:$H$6=$A3)

Try this now -
Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$G$8:$H$78)*(Sheet1!$A$8:$A$78=C$1)*(Sheet1!$F$6:$H$6=$C3))
 
Upvote 0
Hey there
It is still not working.
I don't know if it helps but my macro inserts a new column each time I paste the data. This might influence the formula.

calc3 (2).xlsm
ABCDEFGH
1
2
3
4
5Fatura
6Where code27037270372703726253
7PluProdutoPreço UndAlmada V.R.-SulAlmada V.R.-SulAlmada V.R.-SulCacem-Av B Amigos
8type 1103581RPBLACK2-BLACK ULTRA THIN 1,1/40,4429330421
9type 1103582RPBLACK3-BLACK KING SIZE0,4829312814
10type 1103583BOLSA FILTROS REGULAR-8MM-30B-100F0,470243613
11type 1103584BOLSA FILTROS SLIM-6MM-34B-120F0,422448421
12type 1103585ISQUEIRO CLIPPER PEQ. CP22RH0,592207493
13type 1103586ISQUEIRO CLIPPER PEQ FUN1,726832178
14type 1103587ISQUERIRO CLIPPER GRD CP11RH0,678053224
15type 1103902ISQUEIRO CLIPPER CLASS.METAL LARG CAIXA6,585377060
16type 1103903BOLSA FILTROS LONG SLIM-6MM-30B-100F0,543418416
17type 1103904BOLSA FILTROS LONG REGULAR-8MM-20B-100F0,543411271
18type 1105457ISQUEIRO Clipper Classic POP CPR11H1,712208644
19type 1106629ISQUEIRO MINI CLIPPER TUBE0,897561191
20type 1106630PAPEL CLIPPER BLUE ULTRA THIN REGULAR0,351229913
21type 1106631PAPEL CLIPPER PURE ULTRA THIN REGULAR0,351226795
22type 1106632PAPEL CLIPPERPURE ULTRA THIN KSS0,53171588
23type 1106633PAPEL CLIPPER RED REGULAR CLASSIC0,329765336
24type 1106634PAPEL CLIPPER GREEN CUT CORNERS REGULAR0,329763544
25type 1106636MÁQUINA ENROLAR1,65561268
26type 1106637FILTROS POP UP EXTRA SLIM0,668296147
27type 1106638MEN-FILTROS POP UP EXTRA SLIM MENTOL0,744392952
28type 1106639FILTROS SLIM ORGANIC BOLSA0,632205633
29type 1107670SET KING SIZE SLIM+FILTROS DE PAPEL0,83902773
30type 1116773PAPEL RAW ORG HEMP KING SIZE SLIM0,560983040
31type 1116775PAPEL RAW CLASSIC KING SIZE SLIM0,531713688
32type 1116774PAPEL RAW ORG REGULAR0,375618766
33type 1116776FILTROS RAW ORGANIC SLIM0,634158759
34Type 2103588RELÓGIO Medium Price16,78049235
35Type 2103589RELÓGIO Low Price13,414633592
36Type 2103905RELOGIO ANALOGICO26,87805224
37Type 2106640SMARTWATCH SAMI44,770732617
38Type 3106506CIGARREIRA CAIXA PLASTICO2,585375511
39Type 3106506CIGARREIRA SILICONE2,58537262
40Type 3106661Cigarreira Cartão2,58537192
41Type 3106506CIGARREIRA CAIXA METAL2,585377346
42Type 3103906LINHA PORTUGAL PORTA MOEDAS3,30732723
43Type 3103907LINHA PORTUGAL ESTOJO4,380497373
44Type 3103908LINHA PORTUGAL CARTEIRA 25,551225442
45Type 3103909LINHA PORTUGAL CARTEIRA5,55122282
46Type 3103910CARTEIRA PRIMAVERA C/FECHO 119 BAND5,512207025
47Type 3103911CARTEIRA PRIMAVERA GRANDE 1104,380499838
48Type 3103912CARTEIRA PRIMAVERA PEQUEÑA 1113,951224814
49Type 3103913MATRAFONA GIGANTE11,170735498
50Type 3103914BLOCO NOTAS1,570736049
51Type 3103915PULSERIRA PELE COM CAIXA12,282936463
52Type 3103916LICOREIRA CORTIÇA6,682936247
53Type 3103917PULSEIRAS CORTIÇA6,68293438
54Type 3103918COLARES CORTIÇA7,795128135
55Type 3103919CANETA CORTIÇA COM CAIXA5,551225199
56Type 3106507PELUCHE TAM 110,039028318
57Type 3106508PELUCHE TAM 315,658546268
58Type 3106509OCULOS SOL15,307329179
59Type 3106641CARTAS JOGAR PLÁSTICO5,073175179
60Type 3106642CARTEIRA GB SRA PELE24,634157677
61Type 3106643CARTEIRA GB HM PELE-PEQ14,52683917
62Type 3106644CARTEIRA GB HM PELE- GR16,780498210
63Type 3106645SACA ROLHAS CORTIÇA2,780498545
64Type 3106654CIGARREIRAS CORTIÇA5,609762942
65Type 3106655MINIATURA V. PORTO/LICOR BEIRÃO3,36585292
66Type 3106656CONJ 2 MINIATURAS PORTO+BEIRÃO5,073175374
67Type 3106657PORTA MOEDAS PEQ CORTIÇA-VÁRIOS MODELOS4,439024533
68Type 3106658PORTA MOEDAS DA AVÓ-CORTIÇA7,70732864
69Type 3106659PORTA MOEDAS HM -CORTIÇA8,926831117
70Type 3106660PORTA MOEDAS MOCHILA CORTIÇA5,90244747
71Type 3107671PUZZLES- SORTIDOS3,365859949
72Type 3107672JOGO TABULEIRO-SORTIDO6,14634469
73Type 3107673OVO DINOSSAURO3,082934922
74Type 3107674CONJ CORTIÇA11,170738813
75type 4103804BORDA D'ÁGUA1,560984829
76type 5114755TUBOS T&T 500 UND1,970734119
77type 5115903TUBOS KORONA 300 UND1,094633321
78type 5115902TUBOS KORONA 500 UND1,970735684
79
80
81
82Desconto2,5%
83unit price
84type 1103581RPBLACK2-BLACK ULTRA THIN 1,1/40,454
85type 1103582RPBLACK3-BLACK KING SIZE0,495
86type 1103583BOLSA FILTROS REGULAR-8MM-30B-100F0,482
87type 1103584BOLSA FILTROS SLIM-6MM-34B-120F0,433
88type 1103585ISQUEIRO CLIPPER PEQ. CP22RH0,607
89type 1103586ISQUEIRO CLIPPER PEQ FUN1,77
90type 1103587ISQUERIRO CLIPPER GRD CP11RH0,695
91type 1103902ISQUEIRO CLIPPER CLASS.METAL LARG CAIXA6,75
92type 1103903BOLSA FILTROS LONG SLIM-6MM-30B-100F0,557
93type 1103904BOLSA FILTROS LONG REGULAR-8MM-20B-100F0,557
94type 1105457ISQUEIRO Clipper Classic POP CPR11H1,755
95type 1106629ISQUEIRO MINI CLIPPER TUBE0,92
96type 1106630PAPEL CLIPPER BLUE ULTRA THIN REGULAR0,36
97type 1106631PAPEL CLIPPER PURE ULTRA THIN REGULAR0,36
98type 1106632PAPEL CLIPPERPURE ULTRA THIN KSS0,545
99type 1106633PAPEL CLIPPER RED REGULAR CLASSIC0,338
100type 1106634PAPEL CLIPPER GREEN CUT CORNERS REGULAR0,338
101type 1106636MÁQUINA ENROLAR1,697
102type 1106637FILTROS POP UP EXTRA SLIM0,685
103type 1106638MEN-FILTROS POP UP EXTRA SLIM MENTOL0,763
104type 1106639FILTROS SLIM ORGANIC BOLSA0,648
105type 1107670SET KING SIZE SLIM+FILTROS DE PAPEL0,86
106type 1116773PAPEL RAW ORG HEMP KING SIZE SLIM0,575
107type 1116775PAPEL RAW CLASSIC KING SIZE SLIM0,545
108type 1116774PAPEL RAW ORG REGULAR0,385
109type 1116776FILTROS RAW ORGANIC SLIM0,65
110type 2103588RELÓGIO Medium Price17,2
111type 2103589RELÓGIO Low Price13,75
112type 2103905RELOGIO ANALOGICO27,55
113type 2106640SMARTWATCH SAMI45,89
114type 3106506CIGARREIRA CAIXA PLASTICO2,65
115type 3106506CIGARREIRA SILICONE2,65
116type 3106661Cigarreira Cartão2,65
117type 3106506CIGARREIRA CAIXA METAL2,65
118type 3103906LINHA PORTUGAL PORTA MOEDAS3,39
119type 3103907LINHA PORTUGAL ESTOJO4,49
120type 3103908LINHA PORTUGAL CARTEIRA 25,69
121type 3103909LINHA PORTUGAL CARTEIRA5,69
122type 3103910CARTEIRA PRIMAVERA C/FECHO 119 BAND5,65
123type 3103911CARTEIRA PRIMAVERA GRANDE 1104,49
124type 3103912CARTEIRA PRIMAVERA PEQUEÑA 1114,05
125type 3103913MATRAFONA GIGANTE11,45
126type 3103914BLOCO NOTAS1,61
127type 3103915PULSERIRA PELE COM CAIXA12,59
128type 3103916LICOREIRA CORTIÇA6,85
129type 3103917PULSEIRAS CORTIÇA6,85
130type 3103918COLARES CORTIÇA7,99
131type 3103919CANETA CORTIÇA COM CAIXA5,69
132type 3106507PELUCHE TAM 110,29
133type 3106508PELUCHE TAM 316,05
134type 3106509OCULOS SOL15,69
135type 3106641CARTAS JOGAR PLÁSTICO5,2
136type 3106642CARTEIRA GB SRA PELE25,25
137type 3106643CARTEIRA GB HM PELE-PEQ14,89
138type 3106644CARTEIRA GB HM PELE- GR17,2
139type 3106645SACA ROLHAS CORTIÇA2,85
140type 3106654CIGARREIRAS CORTIÇA5,75
141type 3106655MINIATURA V. PORTO/LICOR BEIRÃO3,45
142type 3106656CONJ 2 MINIATURAS PORTO+BEIRÃO5,2
143type 3106657PORTA MOEDAS PEQ CORTIÇA-VÁRIOS MODELOS4,55
144type 3106658PORTA MOEDAS DA AVÓ-CORTIÇA7,9
145type 3106659PORTA MOEDAS HM -CORTIÇA9,15
146type 3106660PORTA MOEDAS MOCHILA CORTIÇA6,05
147type 3107671PUZZLES- SORTIDOS3,45
148type 3107672JOGO TABULEIRO-SORTIDO6,3
149type 3107673OVO DINOSSAURO3,16
150type 3107674CONJ CORTIÇA11,45
151type 4103804BORDA D'ÁGUA1,6
152type 5114755TUBOS T&T 500 UND2,02
153type 5115903TUBOS KORONA 300 UND1,122
154type 5115902TUBOS KORONA 500 UND2,02
Sheet1
Cell Formulas
RangeFormula
E6E6=IFNA(INDEX(Sheet2!B3:B215,MATCH(Sheet1!E7,Sheet2!C3:C215,0)),"")
D8:D78D8=E84/(1+$E$82)
E8:E78E8=RANDBETWEEN(1,100)
Cells with Data Validation
CellAllowCriteria
E7:H7List=Sheet2!$D$3#

calc3 (2).xlsm
ABCDEFG
1Where codeBP MAIO 2022type 1type 2type 3type 4type 5
2Postos/vendasClipper RelogiosBorda d'ÁguaRestantes ArtigosTubos
326253Cacem-Av B Amigos0,00 €
426507Santarem/ nascente0,00 €
526800Santarem/poente0,00 €
627036Almada V.R.-Norte0,00 €
727037Almada V.R.-Sul0,00 €
827004Pêro Pinheiro0,00 €
927008Ic 19-Poente0,00 €
1027078Ramalhão0,00 €
1127114Mealhada-Nascente0,00 €
1227115Mealhada-Poente0,00 €
1327168Santarem -Variante0,00 €
1427406Duarte Pacheco0,00 €
1527311A21-Mafra Nasc/N0,00 €
1627312A21-Mafra Poen/S0,00 €
1727088Aeroporto0,00 €
1827020Albufeira V. R.0,00 €
1927010Amadora0,00 €
2027011Amadora II-Funch.0,00 €
2127006Areeiro0,00 €
2227145Braga-31 Janeiro0,00 €
2327182Caneças0,00 €
2426264Carcavelos0,00 €
BP_MAIO_2022
Cell Formulas
RangeFormula
C3:C24C3=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$I$8:$J$78)*(Sheet1!$A$8:$A$78=C$1)*(Sheet1!$H$6:$J$6=$C3))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:G3,F4:G217,C4:E215Cell Value<0textNO
 
Upvote 0
Cell reference issue not macro

try

Excel Formula:
=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$E$8:$H$78)*(Sheet1!$A$8:$A$78=C$1)*(Sheet1!$E$6:$H$6=$A3))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,514
Messages
6,179,219
Members
452,895
Latest member
BILLING GUY

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