+ Reply to Thread
Results 1 to 8 of 8

if first N contains value then extract all after - Power Query Excel

  1. #1
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    if first N contains value then extract all after - Power Query Excel

    hi,

    I am looking for a solution that will extract text after "/", but only if that delimiter is within the first 15 digits of a text. I am looking for a solution in Power Query.

    For example:

    RTP2/ 1111101100501000011201 1111101100501000011201
    RTP2/ 1111101100501000011201 / hj7G olk33 1111101100501000011201
    1111101100501000011201 1111101100501000011201
    Last edited by afgi; 02-09-2024 at 03:26 AM.

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

    Re: if first N contains value then extract all after - Power Query Excel

    lets say your data starts in A1.
    then in B1 use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  3. #3
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: if first N contains value then extract all after - Power Query Excel

    hi, sorry, I didnt specify it in my question, but only in the subject. I need to find a solution in Power Query in Excel.
    Last edited by AliGW; 02-09-2024 at 03:32 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  4. #4
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: if first N contains value then extract all after - Power Query Excel

    In Power Query you could use this statement.

    = Table.TransformColumns(#"Colunas Removidas", {{"Test1", each if Text.Contains(_, "/") then Text.BetweenDelimiters(_, "/ ", " /") else _, type text}})

    As in:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 02-09-2024 at 04:24 AM.

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,306

    Re: if first N contains value then extract all after - Power Query Excel

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: if first N contains value then extract all after - Power Query Excel

    thanks, this is what I was looking for!

  7. #7
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: if first N contains value then extract all after - Power Query Excel

    Quote Originally Posted by Czeslaw View Post
    Power Query
    Please Login or Register  to view this content.
    thanks, also works fine

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: if first N contains value then extract all after - Power Query Excel

    Tks for the feedback, glad to have helped.

+ 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: 2
    Last Post: 11-02-2023, 04:18 PM
  2. Replies: 5
    Last Post: 10-31-2023, 11:12 AM
  3. [SOLVED] Power Query Extract
    By AllisterB in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-17-2021, 05:49 PM
  4. Replies: 8
    Last Post: 10-21-2020, 03:02 AM
  5. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  6. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  7. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 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