When the value is lower then an error message.

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
380
Office Version
  1. 365
Platform
  1. Windows
Good morning,
My first step was to ask for the solution, which I got here but it does not work as I want to so I added the sheet and now I can explain what I need.
O5-N5 should not be lower then (J5+L5)+K5. If it does then it should say TE HOOG.

Can this be done?
Thank you for you time.

Romano

Prijscalculatie v2.7.06.xlsm
ABCDEFGHIJKLMNO
1PrijscalculatieBerekening InkoopprijsBerekening KostprijsBerekening Bruto Verkoopprijs
2MargeFactorGrossier korting
33,0% 
4ArtikelnummerOmschrijvingBruto InkoopprijsKortingNetto InkoopprijsOpslag op Bruto Ikp %Opslag op Bruto Ikp regelBerekende InkoopprijsKostprijs bedragKostprijsMarge regelMarge bedragFactor regelGrossier regelBruto Verkoopprijs
5618000Product 12717,0030,0%1901,90 1901,9057,061958,9660,0%1175,3790,0%31343,31
Manual
Cell Formulas
RangeFormula
O3O3=IFERROR(AVERAGE(#REF!),"")
E5E5=C5-(C5*D5)
F5F5=C5*$F$3
H5H5=IFS(AND([@[Opslag op Bruto Ikp %]]=0,[@[Opslag op Bruto Ikp regel]]=0),E5,G5>0,E5*G5+E5,F5>0,((E5)-((E5)*D5)+F5))
I5I5=(H5*$I$3)
J5J5=[@[Berekende Inkoopprijs]]+[@[Kostprijs bedrag]]
L5L5=IFERROR(IFS($K$3>0,(J5*$K$3),K5>0,(J5*K5)),"")
O5O5=IFERROR(IFS(AND($M$3>0,$N$3>0),(J5*$M$3)/(100%-$N$3), AND($K$3>0,$N$3>0),(J5+L5)/(100%-$N$3), AND($M$3>0,N5>0),((J5*$M$3)/(100%-N5)), AND(K5>0,$N$3>0),((J5+L5)/(100%-$N$3)), AND($K$3>0,$M$3>0),"FOUT", AND(K5>0,M5>0),"FOUT", $K$3>0,(J5+L5)/(100%-N5), K5>0,(J5+L5)/(100%-N5), $M$3>0,(J5*$M$3)/(100%-$N$3), M5>0,(J5*M5)/(100%-N5), $M$3>0,(J5*$M$3)/(100%-N5)), "")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O:OCell Value="FOUT"textNO
L4:N63Cellcontains an errortextNO
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,
Not sure to fully understand your requirement ...
What about adding in cell P5 =IF((O5-N5)<(J5+L5+K5),"TE HOOG","")
 
Upvote 0
Good morning,
My first step was to ask for the solution, which I got here but it does not work as I want to so I added the sheet and now I can explain what I need.
O5-N5 should not be lower then (J5+L5)+K5. If it does then it should say TE HOOG.

Can this be done?
Thank you for you time.

Romano

Prijscalculatie v2.7.06.xlsm
ABCDEFGHIJKLMNO
1PrijscalculatieBerekening InkoopprijsBerekening KostprijsBerekening Bruto Verkoopprijs
2MargeFactorGrossier korting
33,0% 
4ArtikelnummerOmschrijvingBruto InkoopprijsKortingNetto InkoopprijsOpslag op Bruto Ikp %Opslag op Bruto Ikp regelBerekende InkoopprijsKostprijs bedragKostprijsMarge regelMarge bedragFactor regelGrossier regelBruto Verkoopprijs
5618000Product 12717,0030,0%1901,90 1901,9057,061958,9660,0%1175,3790,0%31343,31
Manual
Cell Formulas
RangeFormula
O3O3=IFERROR(AVERAGE(#REF!),"")
E5E5=C5-(C5*D5)
F5F5=C5*$F$3
H5H5=IFS(AND([@[Opslag op Bruto Ikp %]]=0,[@[Opslag op Bruto Ikp regel]]=0),E5,G5>0,E5*G5+E5,F5>0,((E5)-((E5)*D5)+F5))
I5I5=(H5*$I$3)
J5J5=[@[Berekende Inkoopprijs]]+[@[Kostprijs bedrag]]
L5L5=IFERROR(IFS($K$3>0,(J5*$K$3),K5>0,(J5*K5)),"")
O5O5=IFERROR(IFS(AND($M$3>0,$N$3>0),(J5*$M$3)/(100%-$N$3), AND($K$3>0,$N$3>0),(J5+L5)/(100%-$N$3), AND($M$3>0,N5>0),((J5*$M$3)/(100%-N5)), AND(K5>0,$N$3>0),((J5+L5)/(100%-$N$3)), AND($K$3>0,$M$3>0),"FOUT", AND(K5>0,M5>0),"FOUT", $K$3>0,(J5+L5)/(100%-N5), K5>0,(J5+L5)/(100%-N5), $M$3>0,(J5*$M$3)/(100%-$N$3), M5>0,(J5*M5)/(100%-N5), $M$3>0,(J5*$M$3)/(100%-N5)), "")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O:OCell Value="FOUT"textNO
L4:N63Cellcontains an errortextNO
Ok what I forgot to mention is that the solution need to be added to the formula in cell O5.
 
Upvote 0
Hi again,

Do you mean you would need an Event macro to pop up as soon as a value input ( in J5,K5,L5,N5) triggers the message "TE HOOG" ?
 
Upvote 0
Hi again,

Do you mean you would need an Event macro to pop up as soon as a value input ( in J5,K5,L5,N5) triggers the message "TE HOOG" ?
That would be a solution too, but I rather have it working in cell O5. If that isn't possible then yes a macro would be fine.
 
Upvote 0
I rather have it working in cell O5
You cannot have a formula that refers to itself, without enabling iterative calculation & that is something most people would recommend against doing.
 
Upvote 0
Solution
You cannot have a formula that refers to itself, without enabling iterative calculation & that is something most people would recommend against doing.
Ok so what would the best solution then be, a macro as suggested?
 
Upvote 0
3 options I can think of.
1) A macro
2) Put the warning in another cell.
3) Use conditional formatting.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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