Jump to content
  • 0

Bedrag afronden op dichtstbijzijnde ,05 en 0,1


MetDick

Question

Posted

Goedenmorgen

 

Ik heb wat hulp nodig

in een tabel wil ik prijzen boven een bepaald bedrag afronden op de dichtstbijzijnde ,05 en 0,1

 

Bedragen onder €2,50 bijven zoals ingevoerd

Bedragen van €2,51 tot €10,00 worden afgerond op dichtsbijzijnde 0,05 (4,15 6,35 etc)

Bedragen boven €10,00 worden afgerond op dichtsbijzijnde 0,1 (11,40 15,70 etc)

 

Ik kom er niet uit

:-(

2 answers to this question

Recommended Posts

  • 0
Posted

Dat kan gemakkelijk met een beetje wiskunde:

 

Round ( Getal / Precisie ; 0 ) * Precisie

 

Voorbeeld:

10,4 op 0,5 afgerond wordt: Round ( 10,4 / 0,5 ; 0 ) * 0,5 = round ( 20,8 ; 0 ) / 2 = 10,5

 

Je hele formule wordt dan:

Let ( 
  precisie = Case ( 
                  Abs ( Getal ) ≤ 2,5 ; 0,01 ; 
                  Abs ( Getal ) ≤ 10 ; 0,05 ; 
                  0,1 )
; 
  Round ( Getal / Precisie ; 0 ) * Precisie 
)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...