+ Reply to Thread
Results 1 to 18 of 18

Vlookup at different granularity / concatenate

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Vlookup at different granularity / concatenate

    Hi,

    Apologize if my title description is confusing but I don't know how to put into words.
    Attached is the file that should explain everything

    Is there any formulae, that I can use, or modify the vlookup formulae, to vlookup the description "Light bulbs" and getting the result highlighted in "yellow"?
    Vlookup only return the first outcome.
    I need to lookup the value on a different row, instead of every first row.

    Hope I explain clear enough
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Vlookup at different granularity / concatenate

    Vlookup only return the first outcome.
    and it always will - after it finds teh 1st match, it stops looking.

    I will see what I can put together for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Vlookup at different granularity / concatenate

    Ok, I think this is what you want...
    =INDEX($D$3:$Q$16,D$2,COLUMNS($A$1:A1))
    copied across

  4. #4
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi FDibbins,

    That works perfectly.
    However, what if the D1:Q1 is actually a date i.e 20/8/2015, 20/9/2015, etc?
    Apologize because I was replacing the date with a number, so that it looks a bit more simple in explaining.
    It is suppose in date format

    Hence, when I apply your formulae, and change the D1:Q1 to date, it's all #REF...

    Appreciate your help to fine-tune this...

    Thanks in advance.

    Regards
    cks1026

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    The issue is not the data: I checked out the formula with dates.


    Check your formula ranges and whether they are absolute or relative

  6. #6
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi JohnTopley,

    Can you send back the excel file?
    Because I was copying FDibbins formulae and copied across, then I changes "1" to 20/8/2015, "2" to 20/9/2015, etc...it turns out to be #Ref
    I didn't change anything on that formulae...

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    Post file to the forum.

  8. #8
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi, JohnTopley,

    Can you refer to my 1st post? the attachment is there?
    I don't know why, but I couldn't attach the file while replying.....

  9. #9
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi, JohnTopley,

    Here you go...
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Try change the date, and you will see #ref...

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    See attached
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi JohnTopley,

    I think I confuse you all, sorry for the misunderstanding.

    Please look at this latest attachment.

    These are just partial item where I need to lookup the outcome as highlighted in "yellow"
    There are about 100-200 items which I want to lookup in similar ways.

    These data are populated into pivot table.

    Looking forward for all your expertise.

    Thanks

    Regards
    cks1026
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    In D48

    =OFFSET($D$2,MATCH($B48,$B$3:$B$44,0)+COLUMNS($A$1:A1)-1,COLUMNS($A$1:A1)-1,1,1)

    Copy down and across

  14. #14
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi JohnTopley,

    That was freakingly brilliant, that's exactly the outcome I'm looking to have.
    However, there are couple of items, where it "lookup" the wrong outcome.
    Not sure what went wrong, because i'm using exactly the formulae you suggested, most of the item I can match it perfectly right.

    Please refer to the attached.

    Refer to Sheet3, where I lookup the outcome from the M+4 forecast, using the formulae you suggested.

    Refer to row10, row11, row 46, row 47

    row 10 = FFF, the outcome from the formulae is 17.30 (the right result should be 0)
    row 11 = GGG, the outcome from the formulae is 14.58 (the right result should be 0)
    row 46 = 1616, the outcome from the formulae is 27.30 (the right result should be 26.31)
    row 47 = 1717, the outcome from the formulae is 94.45 (the right result should be 87.46)

    Please advice.... very stress

    Thanks

    Regards
    cks1026
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    ALL the rows are one out because formula is wrong

    TRY

    =OFFSET('M+4 Forecast'!$D$7,MATCH($A2,'M+4 Forecast'!$B$8:$B$833,0)+COLUMNS('M+4 Forecast'!$A$1:A1)-1,COLUMNS('M+4 Forecast'!$A$1:A1)-1,1,1)

    See original

    =OFFSET($D$2,MATCH($B48,$B$3:$B$44,0)+COLUMNS($A$1:A1)-1,COLUMNS($A$1:A1)-1,1,1)
    Last edited by JohnTopley; 06-24-2016 at 08:24 AM.

  16. #16
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi, JohnTopley,

    One word for your.... AMAZING!
    It works wonderfully well.

    Any chance if I can ask how does this formulae actually work?
    Went to google but didn't manage to get the full understanding of this formulae...

    Thanks

    Regards
    cks1026

  17. #17
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Vlookup at different granularity / concatenate

    Hi JohnTopley,

    One slight adjustment, how can I adjust this below formulae, if the outcome is #N/A?
    How should I replace #N/A to 0, if any...?

    =OFFSET('M+4 Forecast'!$D$7,MATCH($A2,'M+4 Forecast'!$B$8:$B$833,0)+COLUMNS('M+4 Forecast'!$A$1:A1)-1,COLUMNS('M+4 Forecast'!$A$1:A1)-1,1,1)

    Thanks

    Regards
    cks1026

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: Vlookup at different granularity / concatenate

    Try

    =IFERROR(OFFSET('M+4 Forecast'!$D$7,MATCH($A2,'M+4 Forecast'!$B$8:$B$833,0)+COLUMNS('M+4 Forecast'!$A$1:A1)-1,COLUMNS('M+4 Forecast'!$A$1:A1)-1,1,1),0)

+ 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. Vlookup if then concatenate
    By VegasL in forum Excel General
    Replies: 5
    Last Post: 02-08-2016, 05:03 PM
  2. [SOLVED] Concatenate/VLOOKUP
    By Jerche12 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2014, 02:08 AM
  3. How to display data with different levels of granularity in a pivot table?
    By chrisschrimsher in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-06-2013, 03:31 PM
  4. vlookup and concatenate
    By Jerseynjphillypa in forum Excel General
    Replies: 1
    Last Post: 09-01-2012, 02:19 AM
  5. Need more time granularity in graph
    By dbthj in forum Excel General
    Replies: 3
    Last Post: 09-03-2009, 02:26 PM
  6. Vlookup & Concatenate
    By AK262007 in forum Excel General
    Replies: 2
    Last Post: 03-20-2009, 11:43 AM
  7. [SOLVED] VLOOKUP With CONCATENATE and IF?
    By peakoverload in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2008, 01:01 PM

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