I am trying to insert a column that shows the percent change in two figures. I am using the typical new-old/old formula and that works great unless the old figure is a 0 and then I get an error. How do I correct this?
I am trying to insert a column that shows the percent change in two figures. I am using the typical new-old/old formula and that works great unless the old figure is a 0 and then I get an error. How do I correct this?
Last edited by esion9302; 07-12-2010 at 12:50 PM.
please upload the excel file
=IF(A1=0, "",(B1-A1)/A1)
where A1 = old value
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
ChemistB is correct, the reason it comes back with an error is because mathematically you cannot divide by 0, so you get #DIV/0, using the formula will leave it blank.
What type of IF statement am I supposed to use? Thanks.
what do you mean? the if statement is the one ChemistB posted, but according to your excel:
=IF(B1=0;"";(A1-B1)/B1)
in all your column C
Sorry, I just caught the problem. On the original file they have last year's value in B so I had A and B switched on the IF statement. Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks