+ Reply to Thread
Results 1 to 6 of 6

Substitute function with VLOOKUP

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    32

    Arrow Substitute function with VLOOKUP

    (original thread)
    Quote Originally Posted by JBeaucaire View Post
    Like so:

    =SUBSTITUTE(SUBSTITUTE(D$1," - Long",""), " - Short", "")

    ...or

    =SUBSTITUTE(SUBSTITUTE(D$1," - Long","Consumer"), " - Short", "Consumer")
    Is it possible to combine the second option with vlookup in order to find matches inside the text and replace those with the correspondent value?
    Last edited by JBeaucaire; 05-23-2013 at 04:56 PM. Reason: Moved to thread of its own, as per Forum Rules. Please take a moment to read the forum rules, link above in menu bar.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Substitute function with VLOOKUP

    Possibly. Need more information to suggest anything.


    ==============
    When you joined the forum recently you agreed to abide by the Forum Rules, but in haste I fear you might not have actually read them. Please stop and take a moment to read them now. We all follow these rules for the benefit of all, as must you. Thanks.

    (link above in the menu bar)
    ===================================
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Substitute function with VLOOKUP

    What I need to do is this:

    I have a column (B) with this function =SUBSTITUTE(A1,",","") in all cells to replace commas inside the text in column (B).

    Inside that function I would like to add other function that looks inside a range of cells for a value and replace that exact match by the text inside the correspondent one.

    This is the cells range where I have the values stored =VLOOKUP(B1,'Sheet 2'!C$2:D$33,2,0)

    p.s. - My excell is in Portuguese so it might be some errors on the functions (which where corrected by me).

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Substitute function with VLOOKUP

    So perhaps you replace the A1 in the first formula with the entire second formula?

    Or replace the B1 in the second formula with the entire first formula?

  5. #5
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Substitute function with VLOOKUP

    That's not what I need. What I need is to combine both because I still need to remove all the comas...

    I need something like this =SUBSTITUTE(A1;",";"";)=VLOOKUP(A1;'Sheet 2'!C$2:D$33;2;0)
    Last edited by gach; 05-24-2013 at 06:00 AM. Reason: add example

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Substitute function with VLOOKUP

    Please provide a real-world example, talking in formulas only works when it's 100% clear what the problem/need is. Best is to upload a sample workbook showing us sample data on Sheet1 and Sheet2 and a manual mockup of the results you need.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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