+ Reply to Thread
Results 1 to 2 of 2

Efficient Way to split up strings?

  1. #1
    Registered User
    Join Date
    12-28-2018
    Location
    Pennsylvania, US
    MS-Off Ver
    Excel 2016-Windows 10
    Posts
    35

    Efficient Way to split up strings?

    So I have a data problem. We're in the process of getting a badly needed new ERP system. This means we're trying to transfer over a lot of data and one of those lists we need is customer's parts and what their agreed pricing is.

    I have a list of my company's part numbers and what our customer's call those part numbers as well as our agreed on price. For some reason, someone decided that when a customer changes their part number or comes up with a new part number for our part, we'll just add a '/' followed up with the new part number in the same field. This results in a list looking like attached where we have any number of customer part numbers all in one cell on one line with one company part number. We want to discontinue this and need to convert the current list into just one part number per line.

    The issue is this will be very time-consuming to do manually because there could be one of our part number but 4 customer part numbers all in 1 line and I need to convert that into 4 lines of data basically repeating the same info and this is the situation for thousands of part numbers.

    Is there any automated way to break the customer part numbers out separately(they're all separated by '/') so that they're line by line and then I can just do a lookup on the old list to bring in our part number and pricing info?

    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,912

    Re: Efficient Way to split up strings?

    Simple exercise employing Power Query and using the Split Function. Here is the Mcode
    Please Login or Register  to view this content.
    v A B C D E F
    1 Customer Part Number Company Part Number Customer Price Cost Profit Margin
    2 abc123 XABC123 5 4 1 0.2
    3 abc124-2 XABC123 5 4 1 0.2
    4 bcd123 X807-UX 10 7 3 0.3
    5 bcd124 X807-UX 10 7 3 0.3
    6 bcd125-5 X807-UX 10 7 3 0.3
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] Split strings based on numbers and gather scattered strings
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-10-2016, 09:44 PM
  2. SUMIF & Split Strings
    By JimmyT10 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-16-2015, 08:29 PM
  3. Most Efficient Way to Resort Strings
    By monkeyofexcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-02-2014, 10:50 AM
  4. [SOLVED] More efficient way to search for data and split into worksheets?
    By virgincinboy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-29-2013, 08:33 AM
  5. using the split function on an array of strings
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2013, 12:52 AM
  6. Help with making code more efficient and identifying strings by using a part of it
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-19-2011, 07:49 AM
  7. most efficient way to check cell data against 3 known strings
    By scudder12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-10-2010, 06:01 AM

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