+ Reply to Thread
Results 1 to 15 of 15

Data separation from single column multiple columns

  1. #1
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Data separation from single column multiple columns

    Hello Experts..

    In the attached excel (sample data.xlsx) - In Column A various object properties are there. In which I need to extract 3 columns - Class, Object,Select equivalent.
    For the reference purpose I have highlighted these 3 column in different colors.
    kindly some one can provide a macro to do this data extract.

    Thanks In Advance,

    SP
    Attached Files Attached Files

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    Hi

    Not tested so intesively:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    Hi KOKOSEK,

    Thank you for the quick reply.
    As per your macro data is splitting into individual columns but some information is coming. If we add a condition to pull the data between two strings then this code would be perfect for requirement.

    for Class column values should be in between 2 strings ("Class: " and "Description: " )then result would be "Contract Terms"

    For Object column values should be in between 2 strings ("Object:" and "Type:" ) then result would be " Qualifier"

    For Select equivalent column values should be in between 2 strings : ("Select equivalent: " and "Where equivalent: " ) then result would be "CONT_CALC.PRICE_GRP_TYP_CALCBASE"

    Thanks again.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    Hmm I don't understand to be honest. What do you mean between 2 strings?
    First section has no description.
    Object: INV section has not contain Where equivalent

  5. #5
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    Quote Originally Posted by KOKOSEK View Post
    Hmm I don't understand to be honest. What do you mean between 2 strings?
    First section has no description.
    Object: INV section has not contain Where equivalent
    I have attached a subset data... in which data highlighted blue color need to extracted. hope you will understand now. Thanks..
    Attached Images Attached Images
    Last edited by meredianblues; 04-18-2019 at 01:56 PM.

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    Edit post and try to re-attached file. Can't be download now.

  7. #7
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    can you please check it now.

    Thanks!!

  8. #8
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    Hey KOKOSEK,

    The given macro is working pretty much as expected. But when i ran the same macro for similar data set , output is missing some data.
    I have attached another sample2.xlsx data set, Could you please look the data and modify the macro accordingly.

    Thank you very much for all your support

    Thanks,
    Attached Files Attached Files

  10. #10
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    I've tweak a bit Class & Object but Definition column is hard to catch because there is any pattern about data.
    Some of them are in 1 line, other in 2 or 4 or 5.


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

  11. #11
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    Hey..

    just a thought , before generating Definition column,
    After identifying object value,
    search for which cell having "select equivalent " word and which next cell having "Where equivalent"

    after identifying the cell if we can concatenate the cells between "select equivalent and Where equivalent "
    then after we can extract data between "select equivalent and Where equivalent " .

    Thanks,

  12. #12
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Data separation from single column multiple columns

    In theory. Sometimes next cell in column contains part of value which we are looking for, sometimes indeed word 'Where', sometimes is next cell in column, sometimes 3 row down.

  13. #13
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    Quote Originally Posted by KOKOSEK View Post
    In theory. Sometimes next cell in column contains part of value which we are looking for, sometimes indeed word 'Where', sometimes is next cell in column, sometimes 3 row down.
    True, Is there anyway to have a nested loop and search for the string?
    Any Thoughts?

    Thanks,

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Data separation from single column multiple columns

    Try
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    04-17-2019
    Location
    Bangalore
    MS-Off Ver
    Ms Office 2007
    Posts
    12

    Re: Data separation from single column multiple columns

    This is perfect

    Thanks for the solution.

+ 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. Combining multiple columns data into a single column
    By tmor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-25-2016, 07:12 PM
  2. [SOLVED] Convert data in multiple columns to single column
    By rkoffy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2012, 08:03 AM
  3. single data column into multiple columns
    By ifsmithy in forum Excel General
    Replies: 5
    Last Post: 02-08-2012, 12:38 AM
  4. How do I parse a single column of data into multiple columns?
    By stevenica in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2011, 02:27 PM
  5. multiple columns data append in single column
    By suresh3566 in forum Excel General
    Replies: 3
    Last Post: 06-11-2011, 07:52 AM
  6. Excel2007 Multiple Data Separation in single cell
    By hactic in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-07-2011, 09:57 PM
  7. [SOLVED] merge data from multiple columns to single column
    By triggerthehorse in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2005, 04:06 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