+ Reply to Thread
Results 1 to 14 of 14

Data to Column, remove unwanted fields

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    5

    Data to Column, remove unwanted fields

    Hello

    I have long list of data saved in word, i want to copy it to excel and with the help of Macro, i want to convert it data to column, but remove some duplicate fields and have same data in one column.

    i have created a macro with steps records, however some of the fields have multiple entries and due to which the row has additional fields, now i want to remove those additional fields, so that i have one data type in one column only, please see the attached word and excel file for example

    below is the code from VBA editor

    Please Login or Register  to view this content.
    now i want to remove the additional name, or do something that same type data is in same column
    Attached Files Attached Files
    Last edited by alansidman; 04-19-2022 at 12:50 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Data to Column, remove unwanted fields

    With one record from the Word file (e.g. the first one) can you show the result you want in Excel
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    01-08-2015
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    5

    Re: Data to Column, remove unwanted fields

    Quote Originally Posted by PCI View Post
    With one record from the Word file (e.g. the first one) can you show the result you want in Excel

    example file added on top

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Data to Column, remove unwanted fields

    Is the list of headers shown in your example, the one you want ?
    In other words, there is not the same list of data in all records: Record 3 has 2 allias

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Data to Column, remove unwanted fields

    A possibility could be:
    1 - You copy paste the data from Word to an "working sheet" in Excel*
    2 - You launch next macro
    The first record is used to prepare the list of items
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 04-18-2022 at 01:41 PM. Reason: Attach file

  6. #6
    Registered User
    Join Date
    01-08-2015
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    5

    Re: Data to Column, remove unwanted fields

    ok, so i have data in either in word or text

    now each records alread has header like Name, Alias, NTLT, followed by ":" how can i sort as per the header

    the only problem i face with text to column is thas some of record has Alias, Alias 1, and two city of birth separated by comma.

    please guide me how can i do it

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Data to Column, remove unwanted fields

    What are your comments about the macro sent, is it doing the job, if not give details

  8. #8
    Registered User
    Join Date
    01-08-2015
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    5

    Re: Data to Column, remove unwanted fields

    thanks for the macro, but i did not understand it, there are two macro and one act 1 thing, also there are multiple tabs like, old, original working etc.

    i did not understand where i can paste data and what steps i follow

    i appreciate your effort, but please explain, or make it little simple

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Data to Column, remove unwanted fields

    OK
    In the file attached in sheet "working Sheet" paste the data from the Word file.
    Then, while you are in "Working Sheet" do control + a to launch macro "Act1"
    Attached Files Attached Files

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

    Re: Data to Column, remove unwanted fields

    For the data uploaded.

    Select source Word document when the code opens dialog box.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    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,882

    Re: Data to Column, remove unwanted fields

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    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

  12. #12
    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,882

    Re: Data to Column, remove unwanted fields

    crossposted: https://chandoo.org/forum/threads/da...-fields.47894/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

  13. #13
    Registered User
    Join Date
    01-08-2015
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    5

    Re: Data to Column, remove unwanted fields

    i request admin to delete this post, as i have already one post going on Chandoo forum.. please delete this i am new had no idea its not allowed here, i will continue my search for answer on other forum

    thanks

  14. #14
    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,882

    Re: Data to Column, remove unwanted fields

    First, we do not delete posts as this is a large data base that is searched regularly by many and any posts may be of help to others. Secondly, we do not forbid crossposting, we expect you to read the rules and understand that we expect you to let us know when you crosspost. This is standard practice across most Excel Forums including Chandoo. If you read our rules and theirs, you will understand better this request.

+ 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] Parse data to 2 columns and remove unwanted data with VBA
    By pdiddy9590 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-13-2018, 10:26 AM
  2. Replies: 7
    Last Post: 05-15-2015, 11:57 AM
  3. [SOLVED] Can some one please help me with V.B.A code to remove the unwanted data in the sheet.
    By boddulus in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-08-2014, 12:30 PM
  4. [SOLVED] Macro Remove Unwanted Data
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2013, 06:01 AM
  5. Formula to remove unwanted data & rearrange last name & first name in a cell
    By rbecker69 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2013, 03:12 AM
  6. [SOLVED] Need macro to remove unwanted data from large tables
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-26-2013, 08:07 AM
  7. remove unwanted data
    By ahmedalhoseny in forum Excel General
    Replies: 1
    Last Post: 06-14-2010, 04:51 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