How do I round my data this way?

himurah182

New Member
Joined
Aug 4, 2022
Messages
21
Office Version
  1. 2019
Platform
  1. Windows
Hey guys,
I have a problem: I made this table that accounts the costs that were incurred by each customer on every product. However, the results between this table and my invoice software differ in some cents.
I think this happens because when I calculate the cost on my table I only apply the discount and round the total to 2 decimal places in the end, which is different from my software that rounds the data to 2 decimal places before getting to the final result which is also rounded.
What do I need to change in my table to get the same result as my software?

On my software, the cost incurred for this customer was 464,57. On my table, the same invoice got 454,56.

Calc.xlsm
ABCDEF
1
2
3
4
5Fatura134
6Where code 26253
7PluProdutoPreço UndCacem-Av B Amigos
8type 1103581RPBLACK2-BLACK ULTRA THIN 1,1/40,454100
9type 1103582RPBLACK3-BLACK KING SIZE0,495
10type 1103583BOLSA FILTROS REGULAR-8MM-30B-100F0,482
11type 1103584BOLSA FILTROS SLIM-6MM-34B-120F0,43334
12type 1103585ISQUEIRO CLIPPER PEQ. CP22RH0,60796
13type 1103586ISQUEIRO CLIPPER PEQ FUN1,770
14type 1103587ISQUERIRO CLIPPER GRD CP11RH0,695144
15type 1103902ISQUEIRO CLIPPER CLASS.METAL LARG CAIXA6,750
16type 1103903BOLSA FILTROS LONG SLIM-6MM-30B-100F0,557
17type 1103904BOLSA FILTROS LONG REGULAR-8MM-20B-100F0,557
18type 1105457ISQUEIRO Clipper Classic POP CPR11H1,755
19type 1106629ISQUEIRO MINI CLIPPER TUBE0,920
20type 1106630PAPEL CLIPPER BLUE ULTRA THIN REGULAR0,360
21type 1106631PAPEL CLIPPER PURE ULTRA THIN REGULAR0,360
22type 1106632PAPEL CLIPPERPURE ULTRA THIN KSS0,545
23type 1106633PAPEL CLIPPER RED REGULAR CLASSIC0,338
24type 1106634PAPEL CLIPPER GREEN CUT CORNERS REGULAR0,338
25type 1106636MÁQUINA ENROLAR1,697
26type 1106637FILTROS POP UP EXTRA SLIM0,685
27type 1106638MEN-FILTROS POP UP EXTRA SLIM MENTOL0,763
28type 1106639FILTROS SLIM ORGANIC BOLSA0,648
29type 1107670SET KING SIZE SLIM+FILTROS DE PAPEL0,860300
30type 1116773PAPEL RAW ORG HEMP KING SIZE SLIM0,575
31type 1116775PAPEL RAW CLASSIC KING SIZE SLIM0,545
32type 1116774PAPEL RAW ORG REGULAR0,385
33type 1116776FILTROS RAW ORGANIC SLIM0,650
34Type 2103588RELÓGIO Medium Price17,200
35Type 2103589RELÓGIO Low Price13,750
36Type 2103905RELOGIO ANALOGICO27,550
37Type 2106640SMARTWATCH SAMI45,890
38Type 3106506CIGARREIRA CAIXA PLASTICO2,650
39Type 3106506CIGARREIRA SILICONE2,650
40Type 3106661Cigarreira Cartão2,650
41Type 3106506CIGARREIRA CAIXA METAL2,650
42Type 3103906LINHA PORTUGAL PORTA MOEDAS3,390
43Type 3103907LINHA PORTUGAL ESTOJO4,490
44Type 3103908LINHA PORTUGAL CARTEIRA 25,690
45Type 3103909LINHA PORTUGAL CARTEIRA5,690
46Type 3103910CARTEIRA PRIMAVERA C/FECHO 119 BAND5,650
47Type 3103911CARTEIRA PRIMAVERA GRANDE 1104,490
48Type 3103912CARTEIRA PRIMAVERA PEQUEÑA 1114,050
49Type 3103913MATRAFONA GIGANTE11,450
50Type 3103914BLOCO NOTAS1,610
51Type 3103915PULSERIRA PELE COM CAIXA12,590
52Type 3103916LICOREIRA CORTIÇA6,850
53Type 3103917PULSEIRAS CORTIÇA6,850
54Type 3103918COLARES CORTIÇA7,990
55Type 3103919CANETA CORTIÇA COM CAIXA5,690
56Type 3106507PELUCHE TAM 110,290
57Type 3106508PELUCHE TAM 316,050
58Type 3106509OCULOS SOL15,690
59Type 3106641CARTAS JOGAR PLÁSTICO5,200
60Type 3106642CARTEIRA GB SRA PELE25,250
61Type 3106643CARTEIRA GB HM PELE-PEQ14,890
62Type 3106644CARTEIRA GB HM PELE- GR17,200
63Type 3106645SACA ROLHAS CORTIÇA2,850
64Type 3106654CIGARREIRAS CORTIÇA5,750
65Type 3106655MINIATURA V. PORTO/LICOR BEIRÃO3,450
66Type 3106656CONJ 2 MINIATURAS PORTO+BEIRÃO5,200
67Type 3106657PORTA MOEDAS PEQ CORTIÇA-VÁRIOS MODELOS4,550
68Type 3106658PORTA MOEDAS DA AVÓ-CORTIÇA7,900
69Type 3106659PORTA MOEDAS HM -CORTIÇA9,150
70Type 3106660PORTA MOEDAS MOCHILA CORTIÇA6,050
71Type 3107671PUZZLES- SORTIDOS3,450
72Type 3107672JOGO TABULEIRO-SORTIDO6,300
73Type 3107673OVO DINOSSAURO3,160
74Type 3107674CONJ CORTIÇA11,450
75type 4103804BORDA D'ÁGUA1,600
76type 5114755TUBOS T&T 500 UND2,020
77type 5115903TUBOS KORONA 300 UND1,122
78type 5115902TUBOS KORONA 500 UND2,020
79
80
81
822,5%1%Discount
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
155
Sheet1
Cell Formulas
RangeFormula
E6E6=IFNA(INDEX(Postos!B3:B215,MATCH(Sheet1!E7,Postos!C3:C215,0)),"")
D8:D78D8=D84
Cells with Data Validation
CellAllowCriteria
E7:F7List=Postos!$D$3#

Calc.xlsm
ABCDEFG
1Where codeBP MAIO 2022type 1type 2type 3type 4type 5
2Postos/vendasClipper RelogiosRestantes artigosBorda D'ÁguaTubos
326253Cacem-Av B Amigos476,474 €0,000 €0,000 €0,000 €0,000 €
426507Santarem/ nascente0,000 €0,000 €0,000 €0,000 €0,000 €
526800Santarem/poente0,000 €0,000 €0,000 €0,000 €0,000 €
627036Almada V.R.-Norte0,000 €0,000 €0,000 €0,000 €0,000 €
727037Almada V.R.-Sul0,000 €0,000 €0,000 €0,000 €0,000 €
827004Pêro Pinheiro0,000 €0,000 €0,000 €0,000 €0,000 €
927008Ic 19-Poente0,000 €0,000 €0,000 €0,000 €0,000 €
1027078Ramalhão0,000 €0,000 €0,000 €0,000 €0,000 €
BP_MAIO_2022
Cell Formulas
RangeFormula
C3:G10C3=SUMPRODUCT((Sheet1!$D$8:$D$78)*(Sheet1!$E$8:$G$78)*(Sheet1!$A$8:$A$78=C$1)*(Sheet1!$E$6:$G$6=$A3))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F4:G217,C3:G215Cell Value<0textNO

Calc.xlsm
ABCDEFGHI
217
218Total464,562 €0,000 €0,000 €0,000 €0,000 €464,56 €
219
BP_MAIO_2022
Cell Formulas
RangeFormula
C218C218=SUM(C3:C217)*(1-Sheet1!$A$82)
D218:G218D218=ROUND(SUM(D3:D217),2)
H218H218=ROUND(SUM(C218:G218),2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F4:G217,C3:G215Cell Value<0textNO
 
Last edited by a moderator:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I first was thinking to suggest using banker's rounding on your intermediate results.

ASTM E29 Rounding - 1046 - Learn Excel from MrExcel Podcast​

and here

However, going by this single example it looks like a simple roundup. The result is 464,5622 €.
Book1
DE
1
2€ 464,5622€ 464,57
Sheet1
Cell Formulas
RangeFormula
E2E2=ROUNDUP(D2,2)
 
Upvote 0
Hi there
It did not work properly when I added other invoices.
My software rounds each line of product (quantity bought x discounted product price) before summing all up.
This is what caused some difference when I added other data.
What should I do?
 
Upvote 0
Then apply rounding to your intermediate results - i.e round is wrapped around your sumproduct - before summing, like your software does.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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