Skip to main content
March 30, 2018
Question

Help convert simple excel formula to java

  • March 30, 2018
  • 1 reply
  • 654 views

I would really appreciate some help with a formula conversion for excel to java please!

i have to work out a vat amount based on two cells-

c1 is a free typed cell, d1 is auto populated with the amount of the percentage based on c1 so:

=(c1*d1)/100

i can’t get the fudging thing to work though and even though it is probably really simple - I can’t figure it out!!!

please could someone offer some advice?

cheers!

This topic has been closed for replies.

1 reply

Karl Heinz  Kremer
Community Expert
Community Expert
March 30, 2018

There are two ways you can accomplish this: Using either the simplified field notation on the Calculation tab, or using a JavaScript. For the simplified field notation, use the following expression:

c1*d1/100

To use JavaScript, the script would be this:

event.value = this.getField("c1").value * this.getField("d1").value / 100;