+ Reply to Thread
Results 1 to 13 of 13

Multiple Table lookup-shortest approach

  1. #1
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Multiple Table lookup-shortest approach

    Find the year today subtract 1 then use that Year table for the lookup with month criteria.
    To better understand i included a sample.

    ef sample.xlsx
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Multiple Table lookup-shortest approach

    Best I could do with 1 example of expected output vlady
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    formula/result is in V10 (highlighted Blue )
    Attached Files Attached Files
    Last edited by dredwolf; 03-12-2013 at 03:07 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Multiple Table lookup-shortest approach

    hey vlady~ yeah, like dredwolf, i think you should include a little more examples. i reckon it's a little more complex like this when you reach future years.
    =INDEX($G$9:$R$28,MATCH(YEAR(T10),INDEX(A9:E28,,MATCH(YEAR(TODAY())-1,$A$7:$E$7,0)),0),MONTH(T10))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Multiple Table lookup-shortest approach

    In U10 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Multiple Table lookup-shortest approach

    Oop... my previous post seems to be the same approach like benishiryo, but got beaten in the end usage of index function in which benishiryo avoided unnecessary usage of match function in the end with just a month function

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Multiple Table lookup-shortest approach

    One more suggestion quys...

    =INDEX(G9:R28,MATCH(YEAR(T10),A9:A28,0),MATCH(MONTH(T10),G7:R7,0))

    But why do i suspect..that you need something else?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Multiple Table lookup-shortest approach

    @Sixthsense:

    a longer formula like yours to pick up the right month can cover more bases. i'm just lazy~

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Multiple Table lookup-shortest approach

    @ dredwolf & @ Fotis1991,

    Just to let you know one condition is missing A7 to E7 (Search Value Current Year -1)

  9. #9
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Multiple Table lookup-shortest approach

    I'm gonna post this, just cause I worked on it after my first post
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I think with this I finally got the Initial problem (this year -1) covered

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Multiple Table lookup-shortest approach

    @ benishiryo,

    But yours is neat and logically constructed based on the data structure which seems to be unchangeable (12 Months in a calendar year) so no need to worry about the comparing of each month with the data (which I did)

  11. #11
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Multiple Table lookup-shortest approach

    @ Sixthsense, yeah, thanks for the Heads Up, thats why I went and posted my (MUCH longer) solution, but I did work on it, so I thought it deserved posting ...lol (maybe a little conceited, but, it did work the brain a bit )

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Multiple Table lookup-shortest approach

    @ Sixthsense:

    So my suspicion was correct ...

    I just now drink the first cup of coffee...!

  13. #13
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Multiple Table lookup-shortest approach

    Thanks guys, I appreciate your time looking to this one.
    Solutions offered are all excellent.

+ 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