+ Reply to Thread
Results 1 to 12 of 12

Vlookup and returning previous months data

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: Vlookup and returning previous months data

    Another solution, this time one that doesn't use an array formula. It requires your dates are sorted oldest to newest.

    Again, in my formula the columns contain data starting in row 2:
    A: codes
    B: dates
    C: current period % value
    D: prior period % value (desired result)
    =IFERROR(INDEX($C1:C$2,MATCH(A2,INDEX($A1:A$2,IFERROR(MATCH(DATE(YEAR(B2),MONTH(B2)-1,0),$B1:B$2,0),1)):INDEX($A1:A$2,MATCH(DATE(YEAR(B2),MONTH(B2),1),$B1:B$2,1)),0)),"")
    *This one does not have to be entered with CTRL + SHIFT + ENTER

    example1.jpg
    Last edited by ThirdFret; 08-25-2015 at 02:01 PM. Reason: attached example solution

+ 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. [SOLVED] Add data for previous six months in a number of columns.
    By zany in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-24-2013, 09:27 AM
  2. [SOLVED] Find last previous non blank value and summarise previous 6 months
    By Lady_Shaz in forum Excel General
    Replies: 7
    Last Post: 12-11-2012, 06:20 AM
  3. Previous 6 months data
    By highflyer2509 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2012, 06:05 PM
  4. Formula to show current and previous months data
    By dandavis1 in forum Excel General
    Replies: 4
    Last Post: 07-06-2012, 02:02 PM
  5. how to get last day of previous 2 months...
    By jgomez in forum Excel General
    Replies: 3
    Last Post: 06-13-2011, 01:36 PM
  6. Getting data from previous months
    By gloom52 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-21-2009, 06:18 AM
  7. delete previous months data
    By karloss in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2009, 07:14 AM
  8. how to keep previous months' data
    By braadi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-09-2006, 11:55 AM

Tags for this Thread

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