Calculating a Number from the very number it is based on

shah0101

Board Regular
Joined
Jul 4, 2019
Messages
139
Hello Experts,

I have a problem and need your help please. I need to bring total price of 8.91 to 12.00 but the problem is with 3% commercial cost and commission because it is calculated on the very same value which needs to be adjusted.

Is there any formula or similar to get around this please?

Below is just a summary for ease of understand. Actually ton of background calculations are involved in multiple sheets.

Thanks in Advance.

BELOW IS FIXEDTWO ITEMS CAN CHANGE
Trim Cost (A)$1.60$1.60CAN NOT CHANGE
Fabric Cost$2.99$5.16CAN ADJUST
Accessories Cost (B)$1.28$2.21CAN ADJUST
CM COST$2.96$2.99CAN NOT CHANGE
Commercial %3% OF A+B$0.08$0.08CAN NOT CHANGE
Total$8.91$12.04CAN NOT CHANGE
Commission %0$0.00$0.00CAN NOT CHANGE
TOTAL PRICE$8.91$12.00THIS IS TOTAL
 
Last edited by a moderator:
thanks for explianing @footoo

only thing is the 3% and 1.5% varies from one sheet to another so there is a cell where one can put in the %.
That's not a problem provided the rates are shown in the same cells on each sheet.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
shah101
I thought you were removing TRUNC from your formulas - it doesn't do what you need.

@footoo

I created three columns now, one with round difference is 0.09 one with trunc difference is 0.11 and one with simple formating to two decimal places difference is 0.10 // attaching sheet again for ease.



MR-EXCEL-001.xlsx
ABCDEFGHIJKLMNOP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18WITH TRUNCWITH ROUNDWITH FORMAT
19Unit Price USDTotal Amount ( in USD )
20THIS PART CAN BE CHANGEDMTR$1.02$0.95$1.57$1.58$1.58
21THIS PART CAN BE CHANGED   
22THIS PART CAN BE CHANGED   
23THIS PART CAN BE CHANGEDMTR$0.31$0.05$0.08$0.08$0.08
24THIS PART CAN BE CHANGED   
25THIS PART CAN BE CHANGED   
26THIS PART CAN BE CHANGEDMTR$0.31$0.05$0.08$0.08$0.08
27THIS PART CAN BE CHANGED   
28THIS PART CAN BE CHANGED   
29THIS PART CAN BE CHANGEDMTR$2.49$1.94$3.22$3.22$3.22
30THIS PART CAN BE CHANGED   
31THIS PART CAN BE CHANGED   
32THIS PART CAN BE CHANGED   
33THIS PART CAN BE CHANGED   
34THIS PART CAN BE CHANGED   
35THIS PART CAN BE CHANGED   
36THIS PART CAN BE CHANGED   
37THIS PART CAN BE CHANGED   
38THIS PART CAN BE CHANGED   
39THIS PART CAN BE CHANGED   
40THIS PART CAN BE CHANGED   
41
42Total Fabric Cost$2.99PART "A"$4.97$4.97$4.97
43
44
45
46UnitPrice USDTotal Amount ( in USD )
47THIS PART CAN BE CHANGEDPCS$0.41$0.41$0.68$0.68$0.68
48THIS PART CAN BE CHANGED   
49THIS PART CAN BE CHANGED   
50THIS PART CAN BE CHANGEDPCS$0.19$0.38$0.63$0.63$0.63
51THIS PART CAN BE CHANGED   
52THIS PART CAN BE CHANGED   
53THIS PART CAN BE CHANGEDPCS$0.23$0.23$0.38$0.38$0.38
54THIS PART CAN BE CHANGED   
55THIS PART CAN BE CHANGED   
56THIS PART CAN BE CHANGEDPCS$0.05$0.05$0.08$0.08$0.08
57THIS PART CAN BE CHANGEDPCS$0.02$0.02$0.03$0.03$0.03
58THIS PART CAN BE CHANGEDPCS$0.08$0.08$0.13$0.13$0.13
59THIS PART CAN BE CHANGEDPCS$0.09$0.09$0.14$0.15$0.15
60THIS PART CAN BE CHANGEDPCS$0.02$0.02$0.03$0.03$0.03
61THIS PART CAN BE CHANGED   
62THIS PART CAN BE CHANGED   
63THIS PART CAN BE CHANGED   
64THIS PART CAN BE CHANGED   
65THIS PART CAN BE CHANGED   
66THIS PART CAN BE CHANGED   
67THIS PART CAN BE CHANGED   
68THIS PART CAN BE CHANGED   
69THIS PART CAN BE CHANGED   
70
71Total Trim Cost$1.28PART "B"$2.12$2.13$2.13
72
73
74
75UNITUnit Price ( in USD )Total Amount ( in USD )
76THIS PART CAN NOT BE CHANGEDCON$0.65$0.10$0.10$0.10$0.10
77THIS PART CAN NOT BE CHANGEDPCS$0.13$0.13$0.13$0.13$0.13
78THIS PART CAN NOT BE CHANGEDPCS$0.10$0.10$0.10$0.10$0.10
79THIS PART CAN NOT BE CHANGEDPCS$0.02$0.02$0.02$0.02$0.02
80THIS PART CAN NOT BE CHANGEDPCS$0.04$0.04$0.04$0.04$0.04
81THIS PART CAN NOT BE CHANGEDPCS$0.02$0.02$0.02$0.02$0.02
82THIS PART CAN NOT BE CHANGEDPCS$0.07$0.14$0.14$0.14$0.14
83THIS PART CAN NOT BE CHANGEDYDS$0.65$0.90 $0.90$0.90$0.90
84THIS PART CAN NOT BE CHANGEDYDS$0.11$0.15$0.15$0.15$0.15
85THIS PART CAN NOT BE CHANGED   
86THIS PART CAN NOT BE CHANGED   
87THIS PART CAN NOT BE CHANGED   
88THIS PART CAN NOT BE CHANGED   
89THIS PART CAN NOT BE CHANGED   
90THIS PART CAN NOT BE CHANGED   
91THIS PART CAN NOT BE CHANGED   
92THIS PART CAN NOT BE CHANGED   
93THIS PART CAN NOT BE CHANGED   
94THIS PART CAN NOT BE CHANGED   
95
96Total Factory Trim Cost:$1.60PART "C"$1.60$1.60$1.60
97
98
99SUMMARYSUMMARY
100THIS IS TOTAL FROM ABOVE BLUE COLOR SECTIONFactory Trim Cost$1.60PART "C"Factory Trim Cost$1.60$1.60$1.60
101THIS IS TOTAL FROM ABOVE GREEN COLOR SECTIONFabric Cost$2.99PART "A"Fabric Cost$4.97$4.98$4.98
102THIS IS TOTAL FROM ABOVE GREEN COLOR SECTIONAccessories Cost$1.28PART "B"Accessories Cost$2.12$2.13$2.13
103THIS IS FIXEDCM Cost / Pcs$2.96CM Cost / Pcs$2.96$2.96$2.96
104THIS IS FIXEDTesting Cost / Pcs$0.00Testing Cost / Pcs$0.00$0.00$0.00
105TO BE CALCULATED ON ($1.6 + $2.99 + $1.28) X % Commercial %3.00%$0.18Commercial %3.00%$0.26$0.26$0.26
106THIS IS FIXED BASED ON %Commission %1.50%$0.14Commission %1.50%$0.18$0.18$0.18
107THIS IS TOTAL FROM ABOVETotal$9.14Total$12.09$12.11$12.10
108$9.14 IS FIRST RESULT AND NEED TO GET TO $12.00$9.14FOB$12.00$12.00$12.00
109
110NEED TO GET TO $12.00:$9.14
Eastern
Cell Formulas
RangeFormula
N20:N40,N71,N47:N69,N42N20=IFERROR(IF(J20="","",TRUNC(J20*N$101/J$101,2)), "")
O20:O40,O71,O47:O69,O42O20=IFERROR(IF(J20="","",ROUND(J20*N$101/J$101,2)), "")
P20:P40,P71,P47:P69,P42P20=IFERROR(IF(J20="","",J20*N$101/J$101), "")
N76:N94,N96N76=+J76
O76:O94,O96O76=+J76
P76:P94,P96P76=+J76
N100:P100N100=+N96
N101:N102N101=TRUNC((N$108-J$108)/(J$101+(J$102-J$102*$M$105)*$M$105+J$102)*J101+J101,2)
O101:O102O101=ROUND((O$108-J$108)/(J$101+(J$102-J$102*$M$105)*$M$105+J$102)*J101+J101,2)
P101:P102P101=((P$108-J$108)/(J$101+(J$102-J$102*$M$105)*$M$105+J$102)*J101+J101)
N105N105=TRUNC(SUM(N100,N101,N102)*M105,2)
O105O105=ROUND(SUM(O100,O101,O102)*M105,2)
P105P105=(SUM(P100,P101,P102)*M105)
N106,J106N106=(N108-(N108*M106))*M106
O106O106=(O108-(O108*M106))*M106
P106P106=(P108-(P108*M106))*M106
N107:P107,J107N107=SUM(N100:N106)
J105J105=SUM(J100,J101,J102)*I105
Cells with Data Validation
CellAllowCriteria
H20:H40List=$BQ$1:$BQ$5
H47:H68List=$BQ$1:$BQ$5
 
Upvote 0
This might help :

shah101 has sent xl2BB’s with his posts.
What he wants in N101:N108 is as follows :

N100 1.60 (fixed)
N101 Change the 2.99 in J101 to make the Total 12.00
N102 Change the 1.28 in J102 to make the Total 12.00
N103 2.96 (fixed)
N104 0.00 (fixed)
N105 Formula to calculate 3% of N100:N102 (fixed formula)
N106 Formula to calculate 1.5% of the Total, net of this amount (fixed formula)
N107 Total of N100:N106
N108 12 (the required Total)

Basically, he just needs to calculate the amounts for N101 and N102.

I’ve provided a macro that does what he wants, but he can’t use a macro.
Do the cells N101 and N102 need to be equal % adjustment? or ?
Is the $12 always 12? Why $12? at least from the example?
 
Upvote 0
@footoo

I created three columns now, one with round difference is 0.09 one with trunc difference is 0.11 and one with simple formating to two decimal places difference is 0.10 // attaching sheet again for ease.
You don't have to do that.
All I can do is repeat (for about the fourth time) : format the cells as a number 0.00
Don't use TRUNC or ROUND in any of the formulas.
 
Upvote 0
Do the cells N101 and N102 need to be equal % adjustment? or ?
Is the $12 always 12? Why $12? at least from the example?
Pro-rata based on J101 and J102.
The 12 per se is not important.
 
Upvote 0
Pro-rata based on J101 and J102.
It appears from the data that s/he is attempting to wrap their freight costs in with the materials . . . ?
Is this a standard amount or ?

The 12 per se is not important.
Hard to know how to get somewhere without knowing where you're going . . .
Just need to understand the problem to give a solution . . .
 
Upvote 0
It appears from the data that s/he is attempting to wrap their freight costs in with the materials . . . ?
Is this a standard amount or ?


Hard to know how to get somewhere without knowing where you're going . . .
Just need to understand the problem to give a solution . . .
The problem is how to handle the formulas in N105 and N106 in calculating the changes to N101 and N102 so as to make the desired Total (whatever it happens to be).
It can be solved via Goal Seek but it involves a lot of sheets so not really practical.
I made use of Goal Seek in my macro.
 
Upvote 0
The problem is how to handle the formulas in N105 and N106 in calculating the changes to N101 and N102 so as to make the desired Total (whatever it happens to be).
It can be solved via Goal Seek but it involves a lot of sheets so not really practical.
I made use of Goal Seek in my macro.
I can give you the $12 easy knowing it is supposed to be $12 . . . If we don't know the # all I can give are inequality values (range of values where the system of equations would fit the $12), but still need to know . . . why this # to even begin ? Kind of like trying to developing a proof in mathematics without enough information . . . impossible

Why the result of $12?
Are the amounts to be adjusted in any ratio or? Need something besides arbitrary choices . . .
 
Upvote 0
I can give you the $12 easy knowing it is supposed to be $12 . . . If we don't know the # all I can give are inequality values (range of values where the system of equations would fit the $12), but still need to know . . . why this # to even begin ? Kind of like trying to developing a proof in mathematics without enough information . . . impossible

Why the result of $12?
Are the amounts to be adjusted in any ratio or? Need something besides arbitrary choices . . .
I've asked the same question many different ways without any real answer other than 'just cuz I picked it' . . . lol I'm not a mind reader I don't know what you will pick next . . .
 
Upvote 0
The figure of 12 is not important and does not affect the method of calculation.
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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