Hi everyone, this is Sharon! You may have wondered
if fillable PDF forms can do calculations, and if so how do I create a fillable PDF with
calculations? Well yes they can, and I'm going to show you exactly how to create a PDF form with
calculations in Adobe Acrobat by converting an Excel invoice template into a PDF and then setting
up the calculating fields in Acrobat. Let's check it out! I have my Adobe Acrobat desktop app open
and now I'm going to navigate over to my Excel invoice template. And here's an invoice template
that I have set up it's got the quantity times the price will give me an amount and then down at the
bottom we have a subtotal, tax rate, sales tax, other, and a total. So let's go ahead and save
this as a PDF. We're going to go up to File...Save a copy. We're going to name the file and then
under the file type drop down and then scroll down and select PDF, then click Save. Okay notice that
the PDF is now open in a new tab here in Acrobat. So let's go over to the right and down here click
on Prepare Form. Our PDF will load right here in this window, and notice that the form field Auto
detection is ON and we're going to click Start. All right I'm going to go ahead and close this
pop-up window here, and the auto detection has looked at this form and gone in and placed form
fields automatically where it believes a form field should go, so that's a super helpful way
if you are loading in an existing PDF that is formatted kind of like a form. It'll look at the
different lines and boxes and spaces and place a form field in there for you. So we've got all of
our form fields automatically placed in here for us so let's go ahead and start working on the
calculations. Now the first thing you'll notice is that each form field has been automatically
named through that process and so I want to scroll down and just make sure that each of the form
fields, that the name of the form field that was automatically selected or placed, doesn't have
any spaces in between them because when we use calculations we want to be able to use the form
fields we bookmark them by the name and you use them that way and they can't have any spaces in
them in order to work, so down here I noticed that tax rate and the sales tax have a couple of spaces
in here so I'm going to double click those and fix those really quick. All right on the general tab
here I'm just going to delete the space and click Close and I'll do the same thing on the sales tax
we're going to delete the space and click Close. All right now let's go back up real quick and put
in some calculations and format our quantity price and amount fields. So let's start with our row
one here we're going to double click to open up the field properties and we've got QuantityRow1 is
the name of the field so we're going to go over to format and in the drop down here select Number and
under decimal places just select zero since it's a quantity we're just going to put a whole number
in there so we don't need a Currency symbol either and so we're going to click Close. And now for the
price for row one we're going to do the same thing where we go on the format tab we're going to drop
down we're going to select number but this time we do want to select a currency symbol so I'm
going to drop down and select the dollar sign and then I'm going to click Close here and
now for the calculated field so the amount we want to multiply the quantity times the price
so I'm going to double click to open up the amount we're going to format this one also as a number
with the currency symbol and then in the calculate tab we're going to select this first option here
which is value is the and then we have a drop down here that's that helps us build automatic
calculations that are straightforward and simple so if we're just adding or multiplying or taking
an average, min or max of a couple of fields then we can use this first option here and so in this
option I'm going to select product (x) and we are going to pick the fields. We click on Pick
and then we select the fields that we want to multiply so that is going to be our QuantityRow1
and PriceRow1 so we'll look for QuantityRow1 and PriceRow1 and we're going to click OK. So
that's going to place the two fields in there that are going to be multiplied together for
that amount and then I just click close And let's go ahead and do that for the next row just
so we can see at least two lines of our invoice when we do our test so we'll go ahead and update
the format to number and zero for the quantity for the decimal places and we won't have a
currency on there and we'll just click Close. We'll update the PriceRow2 as a number and select
the currency symbol for two decimal places there click Close. And then now AmountRow2 and
we're going to format that one as a number and then set up the calculation for that
one we're going to say value is the product and then we're going to pick our fields and
it's going to be QuantityRow2 and PriceRow2 And click OK and click Close. All right so now
that we have a couple of those set up that we can do some testing let's go down and set up the rest
of our calculating fields which are down here at the bottom so we want our Subtotal which is called
AmountSubtotal, we want this to add up all the different amounts in the invoice so we're going to
double click and we are going to format that one as a number, we have the two decimal places
and a currency symbol and then for calculate on this one we can use the value is the sum
and then we can pick all of the amount fields for this example since we only filled in
AmountRow1 and 2 we'll just pick those and click OK. All right now I'm going to
click Close. For the tax rate we can set this up a little differently, so if we open
up the properties on the tax rate and then if when we click on the format tab here we have
an option to set this to a Percentage so if I set this field to be formatted as a percentage
just keep in mind whatever number you type in there is going to get multiplied by a hundred
so if your tax rate is say 7.5 percent and you format this field to be a percentage then you're
going to want to type in .075 and then that way it will calculate correctly. So just keep that
in mind if you do set that up as a percentage it multiplies whatever number you type in there
by a hundred. And so I'm going to leave that to two decimal places with a separator
style and then I'm going to click Close. And then the sales tax we're going to calculate
to multiply the subtotal by the tax rate so let's open that one up and we'll format this one as
a number with the currency symbol of a dollar sign we'll go to calculate and we're going to
say the product so the multiply the subtotal which is called amount subtotal and we're
going to multiply that by amount tax rate and click OK. All right now we're going to click
Close here and then in the Other, let's go ahead and double click and open that up and this might
be a field where say we want to put a discount or something a flat amount that we can put in
as a discount we can format this as a number and if we want to under the negative number
style we can select to show parentheses around the number and it'll have parentheses that will
show up to indicate if it's a negative number and then we can also select use red text if we want
to do that so we can select both of those and it will show up in parentheses with red text if it's
a negative number and so let's go ahead and click close now that that's formatted and so the total
amount is going to we're going to add the subtotal the sales tax and other together so let's double
click to open that up now since let's go ahead and format that, we'll drop down and say number,
two decimal places, currency symbol a dollar sign, and then under calculate we could do the value
and just pick those fields and add them but I also want to show you how to use the Simplified
Field Notation so this option the second option the Simplified Field Notation you can use this
if you have a little bit more complex of an equation that you want to put in for the system
to calculate. So for example if you had a couple of form fields like let's say you had annual
salary and you wanted to divide it by 2080, you could hard code your divisor in the equation
you would be able to type that into the field here. So for example you would click on Edit and
then it opens up a window that you can expand here and then all you would have to do is type the
name of the field and so in that example I just gave if we had a field that was named salary we
could hit the divided by and then type in 2080 and then this field would calculate it would
take the value that's placed in the salary field and divide it by 2080. So that's how you
would use this this option to do some additional calculations. So right now what I want to
do is I'm going to add the AmountSubtotal Plus sales tax which is called AmountSalesTax Plus AmountOther so you can use that and to create this calculation
here for you as well so I'm going to click OK and it has the math equation in here
adding those fields together. The third option which is a custom calculation
script, would be an option you could use if you had a very complex calculation
and you're familiar with JavaScript, it would be the JavaScript code that you
would write to perform that calculation and that's the third option down there. So
let's go ahead and click Close. And Let's test out our form. So to test our form we're
going to come up here and click on Preview Let's scroll up, all right let's put a
couple values in here and test this out All right it looks like our amounts are
calculating correctly. We put in a quantity and price and it multiplied those, and so if
we scroll down here to the bottom we see that our Subtotal is calculating correctly, so let's
go ahead and put in our Tax Rate. Remember we format it as a percentage so we're going to put in
.075 for seven and a half percent. We'll hit Tab and that gives us our Sales Tax. So hit tab again
and then we're in the Other field so it's giving us our total at $645. Lt's say we want to give a
$45 discount, we'll say minus 45 and hit Tab and then this will give us our final rate. It'll show
45 as a negative in parentheses in red and it'll add up the total as $600 for the invoice. So this
is working really well so let's come back up we can click on Edit to go back to the form. And
before we save it, we want to clear it out so let's go under where it says More, there's a drop
down and then hit Clear Form, and this will clear out all the test data that you did to test out
your form. And then you can come up to Save it. You'll go to File...Save as, select a location,
you can rename it if needed and click on Save. Now you've got your calculating form fields
ready to go. If you found this video helpful, be sure and give it a thumbs up to like it.
You can Subscribe to my channel and click the bell to receive a notification every time I
post a new video. Se sure and visit my website sharonsmithhr.com and I look forward to seeing
you in the next video. Thanks for watching!