+ Reply to Thread
Results 1 to 6 of 6

vlookup & substitute

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    vlookup & substitute

    Hi,

    Pls find enclosed in attachment.I have a worksheet name "result"in K column I could not pull out the desired result.Here,I have mentioned the expected result manually in K column.But in J it is able to pull out using vlookup & substitute but not in K column .The match is done between worksheet pt.In my actual worksheet "pt"is infact a pivot table data.

    However,any function like sumproduct,etc can be used to get the desired result.

    Thanx in advance.
    Last edited by paradise2sr; 09-13-2018 at 08:11 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: vlookup & substitute

    Your output looks wrong to me.
    There are not multiple entries for 970237
    There are multiple entries for 970856.

    in L22
    =VLOOKUP(J22,pt!B1:C1000,2,0)

    will return a single value

    Not sure how you're gonna deal with multiple entries
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: vlookup & substitute

    No, matching should be done with A22 and not with J22 of result worksheet with that of A column of pt worksheet and just pull data of C column of pt worksheet.Also K23 data in result worksheet can be ignored as it results in multiple entries.I hope it would further ease to all.

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: vlookup & substitute

    The problem because of length of character in both sheets.
    if you enter function =len(A22) in result sheet & =len(A5) in pt sheet you will get result as 36 & 35.
    Excel count blank space also.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: vlookup & substitute

    I have found this
    Index(pt!c5:c8,match(substitute(result!A22," ",""), substitute (A5:a8," ",""),0)) with CSE

    Now to get further desired result
    Since A7 data in pt worksheet is blank,then,K23 result in result worksheet should show error,or user-defined text as match found of A23 in result worksheet to that of A6 below data i.e A7 is blank in pt worksheet.

    How this can be now further done or extended taking into consideration that if corresponding matching data below is blank in index,match, substitute formula or any best of it.
    Last edited by paradise2sr; 09-13-2018 at 02:41 PM.

  6. #6
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: vlookup & substitute

    Still waiting,if possible by VBA then also pls let me know.

    Now I have posted at also link https://chandoo.org/forum/threads/wh...working.39740/
    Last edited by paradise2sr; 09-14-2018 at 08:08 AM.

+ 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] SUBSTITUTE not working in VLOOKUP
    By Syed Waqar Ali in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2015, 02:49 AM
  2. Vlookup and Substitute - Combine
    By Stressed_Daniel in forum Excel General
    Replies: 2
    Last Post: 07-16-2015, 07:38 AM
  3. Substitute in a vlookup
    By cbh35711 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2015, 09:59 AM
  4. [SOLVED] Substitute for VLOOKUP with “1” or True?
    By artistdedigital in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-08-2014, 08:41 PM
  5. Substitute function with VLOOKUP
    By gach in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2013, 10:59 AM
  6. VLookup Substitute
    By RM1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2011, 04:03 PM
  7. VLookup Substitute
    By sabunabu in forum Excel General
    Replies: 5
    Last Post: 03-27-2008, 07:47 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