Skip to main content
meenamani
Participant
Feb 16, 2017 6:41 PM UTC
Answered

Round Down Value

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 is closed to new replies. Start a new post to keep the conversation going.
Joel Geraci
Joel GeraciCorrect answer
Community Expert
Feb 16, 2017 8:20 PM UTC

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.

2 replies

Joel Geraci
Community Expert
Joel GeraciCommunity ExpertCorrect answer
Community Expert
Feb 16, 2017 8:20 PM UTC

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.

Translate
meenamani
meenamaniAuthor
Participant
Feb 17, 2017 8:14 AM UTC

Hi Joel

Thanks for your answer, it help me a lot.

Translate