Year over Year Calculation Error

cmnapper

New Member
Joined
Sep 8, 2010
Messages
5
I have 3 separate tables. The first contains the list of Merchants I need to pull. The second contains sales data for 2011 the sales for 2010. I have joined the tables on the client name. When I add data, the query runs fine. When I add this calculation =(2011 sales-2010 sales)/2010 sales, I get this error Division by zero, my only option is to click on OK. What am I not doing correctly?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
It sounds like you either have records in your 2010 sales table with a sales amount of zero, or you have clients in your 2011 table that do not exist in your 2010 (you would only see these if you are using a LEFT or RIGHT JOIN instead of an INNER JOIN).

So, in either case you need to account for the possibility of your 2010 sales amount of being zero or null.

If zero, they try:
MyCalc: ([2011 sales]-[2010 sales])/IIF([2010 sales]=0,1,[2010 sales])

If null, they try:
MyCalc: ([2011 sales]-[2010 sales])/NZ([2010 sales],1)
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top