Skip to main content
meenamani
New Participant
February 16, 2017
Answered

Round Down Value

  • February 16, 2017
  • 1 reply
  • 905 views

Hi

I've Excel formula that Round the value of Perticular Cell. I want to implement this formula for the PDF file.

here is the excel formula, =FLOOR(P100,1000)

As you can see it Round Down the value nearest 1000.

I've try this script to do it but it only nearest value please see attached image

var rd=this.getField("RD").value

event.value=Math.floor(rd,1000);

If any one can help me I appreciate.

thanks in advance

Meena

This topic has been closed for replies.
Correct answer Joel Geraci

Math.floor() only accepts one argument... the value you want rounded down. You'll need to divide the value by 1000 then round down then multiply by 1000 if you want to round to the nearest 1000.

1 reply

Joel Geraci
Joel GeraciCorrect answer
Inspiring
February 16, 2017

Math.floor() only accepts one argument... the value you want rounded down. You'll need to divide the value by 1000 then round down then multiply by 1000 if you want to round to the nearest 1000.

meenamani
meenamaniAuthor
New Participant
February 17, 2017

Hi Joel

Thanks for your answer, it help me a lot.