+ Reply to Thread
Results 1 to 7 of 7

extract last 3 numbers from each concat. value in col. B and add to col. A concat cells

  1. #1
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    extract last 3 numbers from each concat. value in col. B and add to col. A concat cells

    Greetings,

    I'm trying to come up with something that would combine the information of 2 different columns that hold a single or multiple concatened values in each cell.

    Column A has the codes referecing the SKU of products, while Column B has the same amount and pattern as Column A, except it references to the Brand code instead (each concatenated SKU has been substituted for the respective brand code).

    What I need to do is extract the last 3 numbers of each value in Column B (for me the problem is dealing with multiple concatenated values separated by a ";") and add it to beginning of each separated value in Column A, followed by a "M".


    I attached a workbook holding the situation. Any help will be appreciated.
    Attached Files Attached Files
    Last edited by therealdees; 04-17-2021 at 10:53 AM.
    Pedro.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

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

  3. #3
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

    It fkin works!!!!

    This is great, thanks for the fast reply

    Could you explain me how the FILTERXML and the formula as a whole works?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

    The filterxml function basically converts a string into an array, one of the best ways to figure out what a formula is doing is to use the Evaluate Formula button on the formula tab.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

    For fixed length, please try at E2

    =TEXTJOIN(";",,TEXT(MID(TRIM(C2),SEQUENCE(9,,4,8),3),"000\M")&MID(TRIM(B2),SEQUENCE(9,,,8),6))

    This split to 9 SKU
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

    Alright, thank you a lot for the tips and solution!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: extract last 3 numbers from each concat. value in col. B and add to col. A concat cell

    You're welcome & thanks for the feedback.

+ 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. concat function for large range of cells
    By rakeshpe43 in forum Excel General
    Replies: 2
    Last Post: 05-05-2020, 02:03 AM
  2. Concat multiple cells in entire sheet.
    By brandon_tx1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2020, 06:49 PM
  3. [SOLVED] Summarize and concat cells
    By soreno in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2019, 06:47 AM
  4. [SOLVED] Formula to concat cells together and then add new components in LEN is not 18
    By batexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2019, 05:20 AM
  5. CONCAT/TEXTJOIN on Variable Number of Cells
    By OlYeller21 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-10-2019, 06:29 AM
  6. trying to concat 2 cells in one DateTime value
    By acheo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2016, 06:41 PM
  7. [SOLVED] concat cells based on date range
    By DamianWarS in forum Excel General
    Replies: 8
    Last Post: 09-14-2012, 12:39 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