+ Reply to Thread
Results 1 to 12 of 12

Remove Every data from Specific Columns before First Semicolon from Left Side

  1. #1
    Registered User
    Join Date
    04-14-2016
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    44

    Remove Every data from Specific Columns before First Semicolon from Left Side

    Respected experts

    Can you help me with a macro which delete data from Specific Columns before the Semicolon from the Left side.

    Current Situation is as in table below

    Company Description Company 2 Description 2 Company 3 Description 3
    Selling Selling; What ever we do Crosschek Crosschek; The waterflow Embedded Embedded; the Whole process


    Required Situation where Column name is Description, Description2, Description 3 only in these specific columns delete data before First Semicolon from Left Side and data should look like given below

    Company Description Company 2 Description 2 Company 3 Description 3
    Selling What ever we do Crosschek The waterflow Embedded the Whole process

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Here, try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-14-2016
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    44

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    It is working,

    Can you make one modification, it is actually deleting data wherever there is semicollon.

    I mean let say if Column entry is
    Selling; What ever we do ; I can make all change; Accordingly I work.

    It should only delete data from Left side before First semicolon only and it should look like below(need to delete Selling; from the set as that is the data before first Semicolon)
    What ever we do ; I can make all change; Accordingly I work.

    Thanks for the help Zbor, this little tweak in code will fulfill my requirement

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

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    OK.
    Also, is there any semicolon that doesn't meant to be deleted?
    In your example, does it delete First word only if it matching Company name from previous column or you want to do that in any way?

    Company Description Company 2 Description 2 Company 3 Description 3
    Selling Selling; What ever we do Crosschek SOMETHING DIFFERENT; The waterflow Embedded Embedded; the Whole process

  6. #6
    Registered User
    Join Date
    04-14-2016
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    44

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Actually Intention is
    1) to delete data if it matches with previous column
    2) And Generally in second column that data which matches with first column ends in semicolon, due to which I said only to remove data from left till First semicolon only..

    Zbor actually you got hold of my core issue..Thanks for that

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    This maybe?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Try this

    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 11-11-2017 at 04:42 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  9. #9
    Registered User
    Join Date
    04-14-2016
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    44

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Great it is working..

    1) Now instead of Selecting that selected column..Can I give names of all such columns where I need to apply this code?
    2) Also will it be possible to add step, if Data in col "Company" is same like data in "Description" column then cell value of Description column should be empty. It should follow for all such columns Company 2 v/s Description 2, Company 3 v/s Description 3.

    I apologies since English is not my first language I made it difficult to explain...But your codes are working for me..Thanks

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Yes, instead of:

    Please Login or Register  to view this content.
    you can put:
    Please Login or Register  to view this content.
    Or for multiple cells:



    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-14-2016
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    44

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Thanks alot Seniors....and Zbor you are awesome...Words are less to say thanks to you...I can only share my gratitude by adding reputation in your kitty..

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,018

    Re: Remove Every data from Specific Columns before First Semicolon from Left Side

    Glad I could Help

+ 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] Need A Macro To Remove All Data Except The Red & Blue Data On The Left Side To Right Side
    By Daddy007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2016, 12:30 PM
  2. [SOLVED] how to remove right rectangle on left side of the cell
    By hktom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2015, 04:46 AM
  3. [SOLVED] Data shift from right side to left side
    By nur2544 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-03-2014, 11:37 AM
  4. [SOLVED] How to move data from right side to left side, please check the attachment
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2013, 03:43 AM
  5. Cut cells and pastng to left side columns
    By LOVE2ALL in forum Excel General
    Replies: 2
    Last Post: 09-04-2012, 08:08 PM
  6. Replies: 4
    Last Post: 12-11-2007, 10:46 PM
  7. Replies: 1
    Last Post: 03-20-2006, 10:15 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