+ Reply to Thread
Results 1 to 10 of 10

MID Fonction from right until a character

  1. #1
    Registered User
    Join Date
    04-19-2021
    Location
    Paris
    MS-Off Ver
    Win 10
    Posts
    4

    MID Fonction from right until a character

    Hello,

    I would like to extract the bold text below but I have an issue...

    [{"name":"601: Chief Daedra Officer","api_id":"2300-14829","id":14829,"length_seconds":9349,"deck":"This week: ....","video_type":"Giant Bombcast","youtube_id":"4Sh_jPSAOzQ","image":"vatar\/0\/30\/3128934-screen%20shot%202019-09-17%20at%202.46.36%20pm%20copy.jpg"},{"name":"..."},{"name":"Yakuza: Like a Dragon","api_id":"2300-16348","id":16348,"length_seconds":4526,"deck":"What happens ...","video_type":"Quick Looks","youtube_id":"hR1FN_6ITEE","image":"vatar\/0\/31\/3253938-yakuza_like_a_dragon_ql.jpg"},{"name":"..."},{"name"..."},{"name":"..."}]

    The whole text is dynamic, excepts "Quick Looks" (I have +700 rows). However, I can extract the right part of the text with the following formula, but I can't extract the left part.

    Please Login or Register  to view this content.
    Result: "Quick Looks","youtube_id":"hR1FN_6ITEE","image":"vatar\/0\/31\/3253938-yakuza_like_a_dragon_ql.jpg"}"

    I think we should extract the text from the right of "Quick Looks" to the "{" character.

    Please can you help me?

    Regards,

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    30,754

    Re: MID Fonction from right until a character

    Assumptions:

    1. You are using Excel 2013 or later.

    2. You are using a PC, not a Mac.

    3. this works:

    =FILTERXML("<A><B>"&SUBSTITUTE(SUBSTITUTE(A1,"}","{"),"{","</B><B>")&"</B></A>","//B[contains(.,'Quick Looks')]")

    However, I suspect we might have fun translating this into French!!!
    Attached Files Attached Files
    Glenn



  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    30,754

    Re: MID Fonction from right until a character

    If your "free text" contains someprohibited characters:

    <

    &

    we will need to apply a fix to the above formula. But first, can we get it working in French in your current n=1 sample????

  4. #4
    Registered User
    Join Date
    04-19-2021
    Location
    Paris
    MS-Off Ver
    Win 10
    Posts
    4

    Re: MID Fonction from right until a character

    Gleen,

    You're my Hero!

    Thank you very much.

  5. #5
    Registered User
    Join Date
    04-19-2021
    Location
    Paris
    MS-Off Ver
    Win 10
    Posts
    4

    Re: MID Fonction from right until a character

    Re,

    The file works but we have some #VALUE! and #EPARS issues.

    Please find the file below.

    Note: Excel converts fonctions in french if we open the file directly.

    Regards
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,151

    Re: MID Fonction from right until a character

    The #Value error can be dealt with quite easily, but where you get the #Spill (#Epars) error it means you have more than one "Quick Looks". What do you want to happen for those, as I notice that one of them has about 7 values?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    30,754

    Re: MID Fonction from right until a character

    No answer to Fluff's question....

    So. This returns each possible answer in its own cell.

    =IFERROR(FILTERXML("<A><B>"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($G2,"&","&amp;"),"}","{"),"{","</B><B>")&"</B></A>","//B[contains(.,'Quick Looks')]["&COLUMNS($L2:L2)&"]"),"")
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-19-2021
    Location
    Paris
    MS-Off Ver
    Win 10
    Posts
    4

    Re: MID Fonction from right until a character

    Hello everyone,

    I just noticed that the right text always starts with "{name:" + the name of the video game (column B).

    Example (Line 32): {"name":"Hitman 2" ..."Quick Looks"...}

    Can we create a conditional function combining the name of the game (Col B) + "Quick Looks" text and a separate function taking into account only the game name?

    Regards,
    Last edited by Bastien13R; 04-20-2021 at 05:01 AM.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,151

    Re: MID Fonction from right until a character

    That creates more problems because of the ' in some of the names & doesn't change the fact that you still get multiple returns for some of the rows.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    30,754

    Re: MID Fonction from right until a character

    I am no longer clear about what you expect to see. Please upload a fresh SMALL sample sheet, with expected results.

+ 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. Replies: 14
    Last Post: 03-01-2021, 10:04 AM
  2. Replies: 14
    Last Post: 05-11-2020, 07:47 AM
  3. [SOLVED] left padding (with given character)
    By acolbrantNMBS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2019, 08:53 AM
  4. [SOLVED] How to use LEFT and RIGHT to delete last character
    By nicolaivinther in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2014, 09:53 AM
  5. Replies: 3
    Last Post: 11-20-2012, 10:03 PM
  6. Replies: 2
    Last Post: 08-19-2008, 07:18 AM
  7. Le dialogue de fonction d'excel appel ma fonction "user defined"
    By nicolas.gendron@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2006, 10:30 PM

Tags for this Thread

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