Calculating percentage change with 0 values? (2025)

  • If you would like to post, please check out the MrExcel Message Board FAQ and register here. If you forgot your password, you can reset your password.

  • Forums
  • Question Forums
  • Excel Questions
  • Thread starterdjacob69
  • Start dateJul 9, 2010
  • Tags
    percent change

D

djacob69

New Member
Joined
Jun 14, 2010
Messages
13
  • Jul 9, 2010
  • #1

Ok. Here is the situation. I have two columns that I need to calculate the percentage change..

Column G is year 2010
Column F is year 2011
Column I is percentage change from G to F (cell is formatting for percentage)

The values in G and F can range from .5966 to 1.56, including a value of 0.000

If I use the forumula (F1-g1)/g1. F1=1.4155 and G1 = 0.000 I will receive a #div/0 error.

If the values for F1=0.000 and G1 = 1.4155. The result will be 100%

I need the forumula to work both ways with the possibility of 0 being used in either column...

Any ideas?

Last edited:

Excel Facts

Easy bullets in Excel

If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Sort by dateSort by votes

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
  • Jul 9, 2010
  • #2

Try

=IF(OR(F1=0,G1=0),0,(F1-G1)/G1)

Upvote0

A

a massive zebra

Board Regular
Joined
Dec 1, 2009
Messages
87
  • Jul 9, 2010
  • #3

djacob69 said:

Ok. Here is the situation. I have two columns that I need to calculate the percentage change..

Column G is year 2010
Column F is year 2011
Column I is percentage change from G to F (cell is formatting for percentage)

The values in G and F can range from .5966 to 1.56, including a value of 0.000

If I use the forumula (F1-g1)/g1. F1=1.4155 and G1 = 0.000 I will receive a #div/0 error.

If the values for F1=0.000 and G1 = 1.4155. The result will be 100%

I need the forumula to work both ways with the possibility of 0 being used in either column...

Any ideas?

Not sure if this is what you want but the following will give you 100% when g = 0:

=if(iserror((F1-g1)/g1),1,(F1-g1)/g1)

Upvote0

D

djacob69

New Member
Joined
Jun 14, 2010
Messages
13
  • Jul 12, 2010
  • #4

Both of these examples work, just not the way I thought they would.

What would be the percentage change going from .5966 to .00000.

I am running into a problem when using this as the values. The very next set of values are .00000 to 1.41555

One way it works and then the next time I get the #div/0 error. How can I get to actually calculate percentage using .0000?

Calculating percentage change with 0 values? (2)

Upvote0

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
  • Jul 15, 2010
  • #5

How? As I see it, both cater for zero and never return #DIV/0!

Upvote0

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
2,105
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
  • Jul 15, 2010
  • #6

djacob69 said:

Both of these examples work, just not the way I thought they would.

What would be the percentage change going from .5966 to .00000.

I am running into a problem when using this as the values. The very next set of values are .00000 to 1.41555

One way it works and then the next time I get the #div/0 error. How can I get to actually calculate percentage using .0000?

Calculating percentage change with 0 values? (5)

If we talk about mathematics here - NO F... WAY Calculating percentage change with 0 values? (6)

Upvote0

Expiry

Well-known Member
Joined
Jun 20, 2007
Messages
865
  • Jul 15, 2010
  • #7

The percentage change from ANY number to zero is 100% (or -100%). ie. you had $10 and you now have no money. you've spent 100% of your money.

You have to make a rule for yourself how you will treat a percentage change from 0 (ie. you always want 0 to X to be shown as 0 or 100%).

There's no getting away from that. It's not a formula problem, it's maths, as bobsan F... put it.

Upvote0

D

djacob69

New Member
Joined
Jun 14, 2010
Messages
13
  • Jul 15, 2010
  • #8

Yep. I understand the concept....It is like digging a hole. How long does it take to dig a hole? Once shovel load.

Thank you for everyone's help...

Upvote0

X

xlfan80c

New Member
Joined
Aug 18, 2017
Messages
1
  • Aug 18, 2017
  • #9

djacob69 said:

Yep. I understand the concept....It is like digging a hole. How long does it take to dig a hole? Once shovel load.

Thank you for everyone's help...

djacob69: I understand what you want to achieve and I have a solution that worked for me. But I hope you have found your solution already since this is an old thread. Anyway, to those who need it, here you go:

Given values:
Cell A1 (July) = 12
Cell A2 (June) = 0

The formula I used to show 100% change is =IF(AND(A2=0,(A1-A2)<>0),1, (A1-A2)/A2)

This also works the other way around if you want to show -100% change.

Cheers and continue paying it forward!

Upvote0

M

mk824196

New Member
Joined
Apr 29, 2019
Messages
2
  • Apr 29, 2019
  • #10

I use this code

=IF(OLD VALUE=0,1,IF(MIN(OLD VALUE,NEW VALUE)<=0,(NEW VALUE-OLD VALUE)/ABS(OLD VALUE),(NEW VALUE/OLD VALUE)-1))

So an example would be in column A we have purchases from 2018 and in column B we would have purchases from 2019. This formula would go in Column C to show the percent change. What it means is; If the value in 2018 = 0 and the value in B2 is greater than zero then the answer is 100%. If this is not true, then it moves on to the next argument which is; if the minimum value in B2 and A2 is less than 0 then you subtract B2 from A2 and the divide it by A2 using the ABS formula. If that is still false then the fail safe is dividing B2 by A2 and subtracting 1 (which is 100%) to show the true growth rate.

=IF(AND(A2=0,B2>0),1,IF(MIN(A2,B2)<=0,(B2-A2)/ABS(A2),(B2/A2)-1))

Upvote0

You must log in or register to reply here.

Similar threads

S

  • Solved

How to calculate the Average with Condition of Networking days from the reference dates

  • shoun2502
  • May 23, 2024
  • Excel Questions
Replies
2
Views
281

May 28, 2024

shoun2502

S

J

  • Question

Userform inconsistent responses

  • Jnb99
  • Aug 28, 2024
  • Excel Questions
Replies
1
Views
154

Aug 28, 2024

Candyman8019

C

S

  • Question

SUM and CHOOSE formula question

  • sea_captain
  • Sep 4, 2024
  • Excel Questions
Replies
7
Views
187

Sep 4, 2024

Fluff

J

  • Solved

Calculating Percent to Recover from Percent Loss

  • jdpro
  • Feb 16, 2024
  • Excel Questions
Replies
3
Views
502

Feb 16, 2024

kevin9999

K

X

  • Question

Data validation formula to change cell colour based on percentage of value in the above cell

  • xpat
  • Jun 10, 2024
  • Excel Questions
Replies
1
Views
241

Jun 11, 2024

myall_blues

Forum statistics

Threads
1,222,296
Messages
6,165,156
Members
451,939
Latest member
kampog

Share this page

  • Forums
  • Question Forums
  • Excel Questions
Calculating percentage change with 0 values? (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 6428

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.