Sie sind auf Seite 1von 8

Tip.

 You can decrease and increase decimal places if


necessary, using the options from the Google toolbar:

Here's how the result looks on real data:

I removed all decimal places making the formula show the


result as a rounded percent.

Percentage of a total in a
Google spreadsheet
Here are a few more examples of calculating percentage of a
total. Though the previous shows the same, it works great for
that example but may not be enough for other data set. Let's
see what else Google Sheets offers.

A common table with a total at its end


I believe this is the most common case: you have a table with
values in column B. Their total resides at the very end of the
data: B8. To find the percentage of the total for each fruit, use
the same basic formula as before but with a slight difference –
an absolute reference to the cell with the total sum.
This type of reference (absolute, with a dollar sign) doesn't
change when you copy the formula to other cells. Thus, each
new record will be calculated based on the sum in $B$8:
=B2/$B$8

I also formatted the results as percent and left 2 decimals to


display:

One item takes a few rows – all rows


are part of the total
Now, suppose a fruit appears more than once in your table.
What part of the total is composed of all deliveries of that
fruit? The SUMIF function will help answer that:
=SUMIF(range, criteria, sum_range) / Total

It will sum only numbers belonging to the fruit of interest and


divide the result by the total.
See for yourself: column A contains fruits, column B – orders
for each fruit, B8 – the total of all orders. E1 has a drop-down
list with all possible fruits where I chose to check the total
for Prune. Here's the formula for this case:
=SUMIF(A2:A7,E1,B2:B7)/$B$8

Tip. Having drop-down with fruits is completely up to you.


Instead, you can put the necessary name right to the formula:
=SUMIF(A2:A7,"Prune",B2:B7)/$B$8

Tip. You can also check a part of the total made by different


fruits. Just add up a few SUMIF functions and divide their
result by the total:
=(SUMIF(A2:A7,"prune",B2:B7)+SUMIF(A2:A7,"durian",B2:B7))/$B$8

Percentage increase and


decrease formulas
There's a standard formula you can use to calculate percent
change in Google Sheets:
=(B-A)/A
The trick is to figure out which of your values belong to A and
to B.
Let's assume you had $50 yesterday. You have saved $20
more and today you have $70. This is 40% more (increase).
If, on the contrary, you've spent $20 and have only $30 left,
this is 40% less (decrease). This deciphers the formula above
and makes it clear which values should be used as A or B:
=(New value – Old value) / Old value

Let's see how this works in Google Sheets now, shall we?

Work out percent change from column


to column
I have a list of fruits (column A) and I want to check how
prices have shifted in this month (column C) compared to the
previous one (columns B). Here's the percent change formula
I use in Google Sheets:
=(C2-B2)/B2

Tip. Don't forget to apply the percent format and adjust the


number of decimal places.
I also used conditional formatting to highlight cells with
percent increase with red and percent decrease with green:

Percent change from row to row


This time, I'm tracking total sales (column B) over each month
(column A). To make sure my formula works correctly, I
should start entering it from the second row of my table – C3:
=(B3-B2)/B2

Copy the formula over all rows with data, apply the percent
format, decide on the number of decimals, and voila:
Here I also coloured percentage decrease with red.

Percent change compared to one cell


If you take the same sales list and decide to calculate
percentage change based on January only, you will have to
always refer to the same cell – B2. For that, make the
reference to this cell absolute instead of relative so it doesn't
change after copying the formula to other cells:
=(B3-$B$2)/$B$2
Amount and total by percentage
in Google spreadsheets
Now that you've learned how to operate percentages, I hope
getting total and the amount will be a child's play.

Find amount when having total and


percentage
Let's imagine you've spent $450 shopping abroad and you'd
like to have the taxes returned – 20%. So how much exactly
should you expect to receive back? How much is 20% of
$450? Here's how you should count:
Amount = Total*Percentage
If you put the total to A2 and the percent to B2, the formula for
you is:
=A2*B2

Das könnte Ihnen auch gefallen