Solved

Formula Assistance

Posted on 2011-03-21
4
234 Views
Last Modified: 2012-05-11
Hello,

I was wondering if someone can please have a look at the attached sheet and let me know if there is a better way / formula to calculate the previous year’s percentage? (Columns Q and S) I am currently having to filter by species code then by each month but I was hoping to automate it so I only have to enter the formula once and then simply drag it all the way down the page as the current way is taking far too long.

Any suggestions will be greatly appreciated!
 EXAMPLE.xlsx
0
Comment
Question by:vegas86
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 35185423
When I open your file, your formula on cell Q12 is like this:

=IF(ISERROR((P12-#REF!)/#REF!);0;(P12-#REF!)/#REF!)

???
0
 

Author Comment

by:vegas86
ID: 35185502
Hi that is because there is no previous year / moth I have started from 2006 so the very first formula will show that. If you look at the one below for 2007 you will see what it supposed to be calculating.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35185547
Hello vegas*6

Note that you can do this calculation...

=(P14-P2)/P2

like this

=P14/P2-1

so if you use EDATE to get last year's date and look that up for the relevant species code then you can use this formula in Q2 copied down

=IFERROR(P2/INDEX(P$1:P1,MATCH(1,INDEX((EDATE(G2,-12)=G$1:G1)*(D2=D$1:D1),0),0))-1,0)

and for S2

=IFERROR(R2/INDEX(R$1:R1,MATCH(1,INDEX((EDATE(G2,-12)=G$1:G1)*(D2=D$1:D1),0),0))-1,0)

see attached

regards, barry
26902060.xlsx
0
 

Author Closing Comment

by:vegas86
ID: 35185622
I just applied it to my sheet and it works perfectly! thank you very much Barry for your quick and flawless response!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question