+ Reply to Thread
Results 1 to 13 of 13

Vlookup with concantenate problems

  1. #1
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Vlookup with concantenate problems

    Where have I gone wrong???




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

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concantenate problems

    'C:\Users\Duane\Downloads\Packing Waste Query test.xls'!"Week6"

    what is week 6 here? wher is the lookup range?
    forget the concatenate for a mo' it should look like this

    =VLOOKUP(A1,'C:\Documents and Settings\Martin Wilson\My Documents\[xxxxxxxx.xls]Sheet2'!$A$1:$B$10,2,FALSE)
    Last edited by martindwilson; 02-14-2013 at 08:38 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    This is what my lookup should look like with out the concantenate

    The "week6 is a named range.
    But when I start adding the C: part etc it don't like it.


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


    The W4 will be the concantenate part

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concantenate problems

    works for me must be what you are concatenating is not quite whats in the other workbook
    =VLOOKUP(CONCATENATE(C1,D1,E1),'C:\Documents and Settings\Martin Wilson\My Documents\xxxxxxxx.xls'!martin,2,FALSE)
    cells c1 =pigs d1= may e1=fly
    named range in xxxxxxxx.xls is "martin" and refers to sheet1 a1:b10 a1=pigsmayfly b1=dog
    formula returns dog no problem

  5. #5
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    Ah I see what Ive done wrong - In the concatenate part, I have written L1,"Packing" That would actually refer to cell L1 where i should have put it as "L1packing"

    so here it is working:

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



    Very stupid mistake that you wouldn't know if reading from your end!!!!!

    Thanks for your time!!!!!

  6. #6
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    Now that it's running, Ive come across another Hitch!!!!!!!

    The named range which the lookup works on will vary each week. So I'm trying to use the Concatenate for the named range also! So it would look like
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So I'm trying to have the part in red as a variable

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


    So Ive written it as:

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


    But no joy!

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Vlookup with concantenate problems

    May be use INDIRECT to convert text to reference:
    =VLOOKUP(.....,INDIRECT("'C:\....'!Week"&V4),....,....)
    Last edited by bebo021999; 02-14-2013 at 12:44 PM.
    Quang PT

  8. #8
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    I've never used INDIRECT before.

    I done this, but comes up with too few arguments.

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

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Vlookup with concantenate problems

    Try to replace 6 with V4 (see my sample in prv. post)

  10. #10
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    Oh yeah!

    Tried this, but comes up with: contains an error, and highlights the last CONCATENATE

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

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concantenate problems

    hard to test
    =VLOOKUP(CONCATENATE("Week",$V$4,"L1Packing"),INDIRECT("'C:\Users\Duane\Downloads\Packing Waste Query test.xls'!Week"&V4),2,FALSE)) note both workbooks need to be open for indirect to work

  12. #12
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Vlookup with concantenate problems

    Ah. In my case the workbook which the lookup is working on needs to be closed, as it will be off a network.

    Is there a way around this?

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concantenate problems

    you could try indirect.ext which is in the morefunc add in but i've had mixed results with it

    http://downloads.info/windows/office.../morefunc.html

+ 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