+ Reply to Thread
Results 1 to 6 of 6

Difficult input table... complexed Vlookup function needed

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Difficult input table... complexed Vlookup function needed

    Hi,

    I've been playing around with VLOOPUP, MATCH, SUMPRODUCT... But I can't seem to get this one right..

    See the attached Excel file..

    I think it should be fairly explanatory.. I want to use the dates in SUMMARY sheet, to pull out the data in the DATA TABLE sheet. The numbers in Column A on the DATA TABLE sheet, is first date in each month, and the numbers represent the day of the month.. .

    Example:
    01.01.2009
    1
    2
    3
    4
    5
    ..
    30

    01.02.2009
    ..


    I hope someone can help
    Attached Files Attached Files
    Last edited by ChrisNor; 03-12-2009 at 05:19 AM.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Difficult input table... complexed Vlookup function needed

    How about something like this?
    =INDEX('Data table'!B:B,MATCH(DAY(A3),OFFSET('Data table'!A$1,MATCH(DATE(YEAR(A3),MONTH(A3),1),'Data table'!A:A,0),0,30),0))

  3. #3
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Difficult input table... complexed Vlookup function needed

    I don't really understand the logic in this formula... Can someone explain it quickly... Using it I get #N/A...

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Difficult input table... complexed Vlookup function needed

    The data set you provide does not cover all the dates on your Summary sheet... where the date being searched for (1st of Month) does not exist on Data Table sheet (Col A) you will get an #NA result

    Ignoring this issue I would suggest a slight alternative to CC's formula:

    Summary!B2:
    =INDEX('Data table'!$B$1:$B$2000,MATCH($A3-DAY($A3)+1,'Data table'!$A$1:$A$2000,0)+DAY($A3))
    copied down

    OFFSET is Volatile so the above would generally be deemed preferable.

  5. #5
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Difficult input table... complexed Vlookup function needed

    Works like a charm... thanks

  6. #6
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Difficult input table... complexed Vlookup function needed

    That is better - I try to avoid volatile functions etc. but I didn't think I could use index to reference a "column within a column" I'm accustomed to using it to reference a column or row within a 2d range...

    As usual, DO, very nice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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