+ Reply to Thread
Results 1 to 4 of 4

Comparing Year on Year Data

  1. #1
    Registered User
    Join Date
    04-17-2008
    Posts
    29

    Comparing Year on Year Data

    Hey folks, I was wondering if anyone could help me out on this on. I've got an Excel sheet with data from different departments of the company I work for on separate worksheets. I'm trying to create an overview sheet that will compare last years figures with this years figures. The problem that I'm having is that when the excel sheet is populated that the figures in the overview page ONLY show the difference between the months to date i.e. If the figures for Jan, Feb, March and April are populated then it will only compare the data between Jan, Feb, March and April of 2007 with the figures for the same month in 2008.

    Another problem that I am faced with is that obviously this document is going to be dynamic and that year after year it will change. Is it easy to take this into account or is it a case that the rules and formulas will need to be changed each year?

    I hope I've explained this properly. Hopefully the attached Excel sheet will explain it. Thanks in advance for anyone that can help out.

    Mick
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-25-2006
    Posts
    54
    Hi Mick

    Are you sure you want to do this progromatically? Looking at your worksheet it LOOKS as though you can just use links and lookups to do what you want.

    As you have the year in each column then you could use HLOOKUP to look up the year on the correct sheet. For example for Ireland your lookup range would be B4 to L20. Use the "2008" header as the criteria for the lookup and ask it to return row 17 so the basic formula on your overview sheet is hlookup("2008",b4:l20,17,false)...you'd need to add in the sheet names and ensure the ranges are right etc etc.

    Use this method and, if you used a link to your header cells (ie the cell address for 2007/2008/2009 etc) then it would be pretty dynamic although you'd probably have to change the ranges from year to year.

    I suspect I may have missed something but can't see the need for programming from your sheet at the mo so do expand a bit if so. See if the attached works for you.

    A
    Attached Files Attached Files
    Last edited by AndySuk; 09-18-2008 at 01:05 PM. Reason: Added attachment corrected error

  3. #3
    Registered User
    Join Date
    04-17-2008
    Posts
    29

    Talking

    Hey Andy,

    Thanks for the reply, it looks as though a hlookup will do exactly what I'm looking for. I've a couple of questions. You say return row 17? Why 17 or am I just being thick?

    P.S. I liked the name you gave for the French range

  4. #4
    Registered User
    Join Date
    10-25-2006
    Posts
    54
    :-) ...I was in non-PC mode!

    I think it may be that I've confused things by naming the range...when the lookup is looking for Row 17 it's not Row 17 on the TAB - it's the 17th row in the lookup range. So Excel has looked for the criteria "2008" in the range B4 to L20 (which I've renamed ire_range). Go down 17 rows form the first one in the range (the first row always has to have the values that you're using as criteria) and you get to the total row which is the one from which you want the values returned. The 17 is a count from the first row in the lookup range - not the numbered row from the Excel sheet.

    Hope that makes a bit more sense but shout if not.

    A

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Comparing two worksheets and matching data
    By Shaunclippo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2008, 03:04 PM
  2. Comparing two worksheet data
    By ramki in forum Excel General
    Replies: 0
    Last Post: 08-06-2008, 06:04 AM
  3. Various macro issues linked to DDE
    By JMann in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2008, 08:08 AM
  4. [SOLVED] Comparing two columns of data
    By elevdown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2007, 10:13 AM
  5. comparing two lists of data
    By meacho in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-01-2007, 09:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1