How to add that percentage in column H.

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,
I am running into a problem which I can't solve. In column I until M you can fill in a number or percentage, depends on the field. In column G you will see that result. This works like I wanted it to.
Now you have column G. What this should do is add a percentage (actually I need marge) to the value that given in column H. I first thought another IF value, but I can't realize that, gives me errors. Does anyone know how to do this?

Thank you for your time.

Artikelen beheren 6.06.xlsm
FGHIJKLMNO
5VerkoopprijsGrossier +korting%Verkoopprijs nieuwVkp bedragVkp + opslag%Kp +factorKp +opslag%Kp +marge%EenheidKostprijs
610,0030,0%25,0060,0%pak10,00
711,00 pak20,00
823,00 pak30,00
Items
Cell Formulas
RangeFormula
H6:H8H6=IFERROR(IFS(M6>0,O6/(1-M6), L6>0,O6*(1*L6)+O6, K6>0,O6*K6+O6, J6>0,F6*(1*J6)+F6, I6>0,I6),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O6:O7088Expression=P6textNO
AQ6:AQ7088,F6:F7088Expression=H6textNO
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I'm not sure what you mean.
Can give me another example please?
 
Upvote 0
I'm not sure what you mean.
Can give me another example please?
I can understand that, I changed the layout a bit. Now the last line I filled in 3 in cell K8 K and that results in G8 being 120. In cell H8 I filled in 30%. I take the value in cell G8 to be 100%, now I need to change that to 130%, so value 120 which is a 100% + the 30% from cell H8 to be added. The formula in cell G8 should do that. I hope I made it a bit clearer now, but can this be done?

Artikelen beheren 6.06.xlsm
ABCDEFGHIJKLMNO
1Importdatum23/01/2024C:\TEMP\ART053_2024-01-23.XMLVERKOOPKOSTPRIJS
2Resource1003
3ValutaEUR
4Teller53
5ArtikelcodeZoekcodeOmschrijvingStatusStartdatumVerkoopprijsVerkoopprijs nieuwGrossier +korting%Vkp bedragVkp + opslag%Kp +factorKp +opslag%Kp +marge%EenheidKostprijs
61000008712759037825Vito Glaserfix 111 6x2 mm wit - 10x25 mA24/09/201910,00 pak10,00
71000018712759037832Vito Glaserfix 111 6x2 mm zwart - 10x25 mA24/09/201911,00 pak20,00
81000028712759037849Vito Glaserfix 111 6x3 mm wit - 10x25 mA24/09/201923,00120,0030,0%3,0pak30,00
Items
Cell Formulas
RangeFormula
B1B1=TODAY()
C1C1=TEXT("C:\TEMP\ART",0)&TEXT($B$4,"000")&"_"&TEXT($B$1,"JJJJ")&"-"&TEXT($B$1,"MM")&"-"&TEXT($B$1,"DD")&".XML"
G6:G8G6=IFERROR(IFS(M6>0,O6/(1-M6), L6>0,O6*(1*L6)+O6, K6>0,O6*K6+O6, J6>0,F6*(1*J6)+F6, I6>0,I6),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F6:F7088,O6:O7088Expression=G6textNO
C6:C7088Expression=LEN(C6)>60textNO
B6:B7088Cell ValueduplicatestextNO
 
Upvote 0
@Romano_odK I may have a solution, but only if I got you right.

Let me show you the math:
You wrote that the result, 120 in this case, is 130% and you need to find the value (let us name it "V") being 100%, so
120,00 = 1.00 x V + 0.30 x V = (1.00 + 0.30) x V => V = 120,00 / (1.00 + 0.30) = 92.3077

Now let's check that
92.3077 + 0.30 x 92.3077 = 120.00001

Then the formula should be as follows (showing only the part where K8 > 0 is being evaluated):
...
Excel Formula:
K8>0,(O8*K8+O8)/(1+H8)
...
With this formula G8 should equal 92.31


Until here, do you agree with me? Or was that not what you ment?
Sorry to say, but I am still unsure if I understood your problem.

If this is not exactly what you need, please provide me any further details that are needed to calculate G8.

Regards
Pete
 
Upvote 0
@Romano_odK I may have a solution, but only if I got you right.

Let me show you the math:
You wrote that the result, 120 in this case, is 130% and you need to find the value (let us name it "V") being 100%, so
120,00 = 1.00 x V + 0.30 x V = (1.00 + 0.30) x V => V = 120,00 / (1.00 + 0.30) = 92.3077

Now let's check that
92.3077 + 0.30 x 92.3077 = 120.00001

Then the formula should be as follows (showing only the part where K8 > 0 is being evaluated):
...
Excel Formula:
K8>0,(O8*K8+O8)/(1+H8)
...
With this formula G8 should equal 92.31


Until here, do you agree with me? Or was that not what you ment?
Sorry to say, but I am still unsure if I understood your problem.

If this is not exactly what you need, please provide me any further details that are needed to calculate G8.

Regards
Pete
Good afternoon Pete,
Thank you for your efforts. I understand what you are writing. The bottom-line is that when I add a value in either H8 I8 J8 K8 L8 or M8 its results in a value in G8 because of the formula this is there. Now what I need is that when I also add a value in H3 it should take the value that is already there in G8 and add the % I would like to add in G8. So that makes the initial value 100% and that should be added with the value I add in H8, making it 130%. The added formula for this to should be added to the one in G8.
 
Upvote 0
Okay, I'm a little bit confused now... Is that a typo there?
... add a value in H3 ...
In cell H3 there is nothing, I guess you meant H8, right?

Now, which values are depending on which input?


It would make things a lot easier for me if you could provide a mini table (or mini sheet) with all possible combinations and their values but that's maybe too much I'm asking for.
 
Upvote 0
Okay, I'm a little bit confused now... Is that a typo there?

In cell H3 there is nothing, I guess you meant H8, right?

Now, which values are depending on which input?


It would make things a lot easier for me if you could provide a mini table (or mini sheet) with all possible combinations and their values but that's maybe too much I'm asking for.
You are right that should have been H8 there. I haven't put a value in column H, but that could be anything. In column I until M I can fill in whatever I want, its a percentage and it should add to the value you get in column H. If first thought that I should use another IF statement to determent if there is a value in column H or not and if there were one make a formula to calculate it, but I already have an IFS statement in column G.

Artikelen beheren 6.07.xlsm
ABCDEFGHIJKLMNO
5ArtikelcodeZoekcodeOmschrijvingStatusStartdatumVerkoopprijsVerkoopprijs nieuwGrossier +korting%Vkp bedragVkp + opslag%Kp +factorKp +opslag%Kp +marge%EenheidKostprijs
61000008712759037825Vito Glaserfix 111 6x2 mm wit - 10x25 mA24/09/201910,005,5610,0%pak5,00
71000018712759037832Vito Glaserfix 111 6x2 mm zwart - 10x25 mA24/09/201920,006,305,0%pak6,00
81000028712759037849Vito Glaserfix 111 6x3 mm wit - 10x25 mA24/09/201930,0042,005,0pak7,00
91000038712759037856Vito Glaserfix 111 6x3 mm zwart - 10x25 mA24/09/201940,0042,005,00%pak8,00
101000048712759037863Vito Glaserfix 111 6x4 mm wit - 10x25 mA24/09/201960,0010,0010,00pak9,00
Items
Cell Formulas
RangeFormula
G6:G10G6=IFERROR(IFS(M6>0,O6/(1-M6), L6>0,O6*(1*L6)+O6, K6>0,O6*K6+O6, J6>0,F6*(1*J6)+F6, I6>0,I6),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F6:F9861,O6:O9861Expression=G6textNO
C6:C9861Expression=LEN(C6)>60textNO
B6:B9861Cell ValueduplicatestextNO
 
Upvote 0
@Romano_odK I'm still unsure if I got you right, but I figured out a formula to what I think you meant:

Excel Formula:
G8 = IFERROR(
 IFS(
  M8>0; IF(H8>0; (O8/(1-M8))*(1+H8); O8/(1-M8));
  L8>0; IF(H8>0; (O8*(1*L8)+O8)*(1+H8); O8*(1*L8)+O8);
  K8>0; IF(H8>0; (O8*K8+O8)*(1+H8); O8*K8+O8);
  J8>0; IF(H8>0; (F8*(1*J8)+F8)*(1+H8); F8*(1*J8)+F8);
  I8>0; IF(H8>0; (I8)*(1+H8); I8)
 );
  "")

Basically it's the same calculation but added to each combination of the IFS function.

So what it does:
First it checks if the value entered in column H is greater than 0 and then takes the values that were calculated in G8 and treats the result as 100%. Then the percentage is added e.g. 30%
If there is no number > 0 in column H the original formula is used.

So, now I'm waiting for your feedback.

Don't worry if it still is not the right formula, I'll keep on trying until we get it done ;)

Regards
Pete
 
Upvote 0
@Romano_odK I'm still unsure if I got you right, but I figured out a formula to what I think you meant:

Excel Formula:
G8 = IFERROR(
 IFS(
  M8>0; IF(H8>0; (O8/(1-M8))*(1+H8); O8/(1-M8));
  L8>0; IF(H8>0; (O8*(1*L8)+O8)*(1+H8); O8*(1*L8)+O8);
  K8>0; IF(H8>0; (O8*K8+O8)*(1+H8); O8*K8+O8);
  J8>0; IF(H8>0; (F8*(1*J8)+F8)*(1+H8); F8*(1*J8)+F8);
  I8>0; IF(H8>0; (I8)*(1+H8); I8)
 );
  "")

Basically it's the same calculation but added to each combination of the IFS function.

So what it does:
First it checks if the value entered in column H is greater than 0 and then takes the values that were calculated in G8 and treats the result as 100%. Then the percentage is added e.g. 30%
If there is no number > 0 in column H the original formula is used.

So, now I'm waiting for your feedback.

Don't worry if it still is not the right formula, I'll keep on trying until we get it done ;)

Regards
Pete
Good afternoon Pete,
This is very very close, but not quite. I indeed does work, but the percentage should do is make it 130%, so when you subtract 30% again you get the 100% again. This is the only thing I am missing right now and I am already very happy. Thank you for your efforts.
 
Upvote 0
@Romano_odK I think this time it should work.

Try this formula for G8:
Excel Formula:
= IFERROR(
 IFS(
  M8>0; IF(H8>0; (O8/(1-M8))/(1+H8); O8/(1-M8));
  L8>0; IF(H8>0; (O8*(1*L8)+O8)/(1+H8); O8*(1*L8)+O8);
  K8>0; IF(H8>0; (O8*K8+O8)/(1+H8); O8*K8+O8);
  J8>0; IF(H8>0; (F8*(1*J8)+F8)/(1+H8); F8*(1*J8)+F8);
  I8>0; IF(H8>0; (I8)/(1+H8); I8)
 );
  "")

I had it the other way round (120 being 100%, but now 120 is 130% again)

Please let me know if the formula works.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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