+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : vlookup and CONCATENATE

  1. #1
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    vlookup and CONCATENATE

    How do I use vlookup to match the meat and cooking method on both tabs (Main & Info) and then add text to the main tab under info from the Info tab by combing cooking Method and Delivery.

    I know I can do CONCATENATE(C2, ". ", D2) in another column and then add it but I would like to skip this step
    Attached Files Attached Files

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: vlookup and CONCATENATE

    Maybe: =VLOOKUP(A2,Info!$A$2:$D$3,3,FALSE)&". "&VLOOKUP(A2,Info!$A$2:$D$3,4,FALSE)

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

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

  3. #3
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: vlookup and CONCATENATE

    Sorry but I noticed the columns didn't look right so i fixed them. But that's no big deal.

    But I need to match the meat and cooking method since when I use your code you provided it gives me the same information if I added another row with the same meat name and different cooking method.
    Attached Files Attached Files

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: vlookup and CONCATENATE

    Try:

    =LOOKUP(2,1/((Info!$A$2:$A$5=A2)*(Info!$B$2:$B$5=B2)),Info!$C$2:$C$3)

    Dom

  5. #5
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: vlookup and CONCATENATE

    Thanks for the help. I changed the code a little since I needed info and delivery status combined together as a sentence.

    =CONCATENATE(LOOKUP(2,1/((Info!$A$2:$A$5=A2)*(Info!$B$2:$B$5=B2)),Info!$C$2:$C$3),". ",CONCATENATE(LOOKUP(2,1/((Info!$A$2:$A$5=A2)*(Info!$B$2:$B$5=B2)),Info!$D$2:$D$3)))

    What if one of the columns is blank. How would I skip that column and add the text of the next column. if you take a look at Beef (BBQ). I just want to show up as Delivered Monday but my code shows it as


    . Delivered Monday

+ 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