+ Reply to Thread
Results 1 to 15 of 15

Vlookup and Concat/Concatenate

  1. #1
    Registered User
    Join Date
    12-13-2018
    Location
    NYC
    MS-Off Ver
    2016
    Posts
    5

    Vlookup and Concat/Concatenate

    I have a two sheet excel workbook using concat and vlookup but doesn’t necessarily have to use those formulas.

    I’d like the results of a lookup from sheet 2 to populate in sheet 1. The lookup is pulling text from sheet 2 that I want to concatenate with cells directly following to the right of out lookup cell in sheet 1.

    To illustrate
    On sheet 1, cell 2A I have a code that a user will input that corresponds to a code bank in column A on sheet 2.

    In cell 2B, I am using a vlookup to pull the corresponding cell from the code bank in sheet 2 (i.e. something from column B).

    In cells 2C and 2D (on sheet 1), the user will input data, which I want to impact the result of 2B.

    I want my text in cell 2b on sheet 2 to be something like: (“Mortgage in the amount of “, [cell ref. to the right of vlookup cell on sheet1], “ dated “, [cell ref. to two to the right of vlookup cell on sheet1], “.”)

    Right now I am using the following code in cell 2b on sheet 2: =CONCAT("Mortgage in the amount of ", C2," dated ", D2, ".")

    When I use my vlookup in sheet 1 cell 2b, the text doesn’t ref. cells 2c and 2d. Is there a way to pull in a cell from another sheet with a formula (such as a concat or concatenate) and use references cells in sheet 1 to impact the results of the vlookup?

    Any help would be much appreciated!

    Thanks!

    Adding link to Mr. Excel site for cross posting (sorry about that):

    mrexcel.com/forum/excel-questions/1080718-vlookup-concat-concatenate.html
    Attached Files Attached Files
    Last edited by acrete; 12-13-2018 at 01:22 PM. Reason: Add site for cross posting

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Vlookup and Concat/Concatenate

    Something like this should work:
    Please Login or Register  to view this content.
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    12-13-2018
    Location
    NYC
    MS-Off Ver
    2016
    Posts
    5

    Re: Vlookup and Concat/Concatenate

    Thanks Paul. That is a start.

    Is there way to lookup a cell from sheet 2 that has a formula similar to the following

    TEXT + Cell reference in sheet 1 + TEXT + Cell reference in sheet 1 + TEXT

    The cell reference would be in the same row just in the following columns to the right

    i.e.
    Sheet 1
    A2: AZ
    B2:
    I want it to read: "Mortgage in the amount of $500,000.00 dated 5/2/2015.
    My code (not working the way I want): =VLOOKUP(A2,Sheet2!A:F,2,FALSE)
    C2: $500,000.00
    D2: 5/25/2015

    Sheet 2
    A2: AZ
    B2:
    Reads:Mortgage in the amount of dated .
    Formula: =CONCAT("Mortgage in the amount of", C2," dated ",D2,".")

    Any thoughts?

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Vlookup and Concat/Concatenate

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.
    Last edited by AliGW; 12-13-2018 at 12:49 PM.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Vlookup and Concat/Concatenate

    As Acrete is a new member, we shall give him the benefit of the doubt this time (and you can post the link for him, as per forum rule #1 - I am afraid I don;t know where the cross-post is, otherwise I'd do it myself).

    Acrete - please note the instructions above - in future, if you cross-post, you must disclose it in the opening post of the thread. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Vlookup and Concat/Concatenate

    This is hugely confusing. If this is incorrect, please delete ALL formulae from your sheet and repost. Add the manually calculated results where you want them to appear and highlight them in yellow...

    ="Mortgage in the amount of "&VLOOKUP(A2,Sheet1!A:D,3,FALSE)&" dated "&TEXT(VLOOKUP(A2,Sheet1!A:D,4,FALSE),"MM/DD/YYYY")&"."

    and

    ="Satisfaction recorded "&TEXT(VLOOKUP(A2,Sheet1!A:D,4,FALSE),"MM/DD/YYYY")&"."
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Registered User
    Join Date
    12-13-2018
    Location
    NYC
    MS-Off Ver
    2016
    Posts
    5

    Re: Vlookup and Concat/Concatenate

    Thank you all for the feedback and quick responses. I've simplified my original question below and in the attachment. I've highlighted in yellow where I need the user to input.

    To summarize:
    I want to lookup a cell from another sheet based off a user input and then I want to amend the result with additional user inputs.

    To illustrate:
    User provides a code that looks up a text from another sheet
    User Input 1:
    AZ
    Text Generated:
    Number of Violations: Years Left: .

    User then to provide two additional inputs:
    User Input 2:
    3
    User Input 3:
    5
    Text Generated:
    Number of Violations: 3 Years Left: 5.

    The issue I am having is that I need the user input to populate within certain areas of the lookup (i.e. within the brackets):
    Number of Violations:[] Years Left:[]

    If the user gave inputs of 3 and 5 the lookup would generate:
    Number of Violations: 3 Years Left: 5.

    Please let me know if anything is unclear. Thanks!
    Attached Files Attached Files

  8. #8
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Vlookup and Concat/Concatenate

    Quote Originally Posted by AliGW View Post
    As Acrete is a new member, we shall give him the benefit of the doubt this time (and you can post the link for him, as per forum rule #1 - I am afraid I don;t know where the cross-post is, otherwise I'd do it myself).
    Cross-post @ https://www.mrexcel.com/forum/excel-...ncatenate.html
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  9. #9
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Vlookup and Concat/Concatenate

    One of these is what I think you are looking for. Put this in G2:

    =LEFT(B2,FIND(":",B2)+1)&C2&SUBSTITUTE(RIGHT(B2,LEN(B2)-FIND(":",B2)),": ",": "&D2)


    OR if you want the initial vlookup included as well use this formula instead in cell B2:


    =LEFT(VLOOKUP(A2,Sheet2!A:E,2,FALSE),FIND(":",VLOOKUP(A2,Sheet2!A:E,2,FALSE))+1)&C2&SUBSTITUTE(RIGHT(VLOOKUP(A2,Sheet2!A:E,2,FALSE),LEN(VLOOKUP(A2,Sheet2!A:E,2,FALSE))-1-FIND(":",VLOOKUP(A2,Sheet2!A:E,2,FALSE))),": ",": "&D2)
    Last edited by dosydos; 12-13-2018 at 05:05 PM.

  10. #10
    Registered User
    Join Date
    12-13-2018
    Location
    NYC
    MS-Off Ver
    2016
    Posts
    5

    Re: Vlookup and Concat/Concatenate

    Thanks for the response. I like the approach in your latter formula to place in B2.

    My concern is that colons ":" won't always be in the verbiage on sheet 2 and ideally there can be up to 9 user inputs altogether. I wasn't clear on that initially. I've update the spread sheet of what I am after.


    Another take on the question.

    I want to pull in a cell from another sheet, using vlookup or similar. That cell has a formula containing cell references. The cell references are in the same row adjacent to the cell.
    So in my file, sheet 2 B2 has a formula referencing C2-J2.
    Can I lookup b2 in sheet 1 and use cells C2-J2 in sheet 1 as my user inputs? Nothing is populating now so my guess is that I have to change either the formula in B2 of sheet 1 or B2 of sheet 2 or both.
    I'm not concerned about formatting date text and current text. Also, putting user inputs on sheet 2 is not an option.

    Thanks in advance!
    Attached Files Attached Files

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Vlookup and Concat/Concatenate

    Quote Originally Posted by macropod View Post
    Thank you, Paul.

    Acrete - you have yet to acknowledge the comments made about your cross-posting. Please let us know that you have understood the issue and that you have now read the forum rules. Thanks.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Vlookup and Concat/Concatenate

    Once again the sample sheet is not clear!! Formulae in sheet 1 pointing at sheet 2 and formulae in sheet 2 pointing to the same place in sheet 1.

    I have made another attempt at guessing what you want. It still won't be right, as you have supplied only ne template.

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


    Please make your description unambiguous and provide a REPRESENTATIVE sample.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-13-2018
    Location
    NYC
    MS-Off Ver
    2016
    Posts
    5

    Re: Vlookup and Concat/Concatenate

    Hi there, thanks for all your help. I was able to figure out a solution to the problem using nested substitutes

    Please Login or Register  to view this content.
    dosydos - thank you for the inspiration!

    AliGW - I posted the cross post disclaimer in the initial thread. Does this suffice? (sorry for breaking the rules). Anything I can do to mark this one as solved?

    See attached for final results.
    Attached Files Attached Files

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Vlookup and Concat/Concatenate

    Ah well... at least you got sorted!!

  15. #15
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Vlookup and Concat/Concatenate

    Quote Originally Posted by AliGW View Post
    As Acrete is a new member, we shall give him the benefit of the doubt this time (and you can post the link for him, as per forum rule #1 - I am afraid I don;t know where the cross-post is, otherwise I'd do it myself).

    Acrete - please note the instructions above - in future, if you cross-post, you must disclose it in the opening post of the thread. Thanks.
    I knew you would come up with something like that

+ 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. [SOLVED] Combination of VLOOKUP and CONCAT
    By damobilebrood in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-13-2018, 04:14 PM
  2. Replies: 2
    Last Post: 12-01-2014, 03:25 PM
  3. [SOLVED] Concatenate/VLOOKUP
    By Jerche12 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2014, 02:08 AM
  4. Need concatenate syntax to concat multiple columns with delimiter (,)
    By kavitha.v in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2014, 07:52 AM
  5. difficult vlookup, 2 column conditions - no concat
    By pavlos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2013, 09:58 PM
  6. [SOLVED] Vlookup using Concatenate
    By dash11 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-31-2012, 07:54 PM
  7. Concat Vlookup
    By Ray789 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2010, 02:15 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