+ Reply to Thread
Results 1 to 9 of 9

How to separating text in cell into separate columns?

  1. #1
    Forum Contributor
    Join Date
    04-09-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    176

    How to separating text in cell into separate columns?

    HI to all
    i have data some data like A/T in a column i would like to split into A in one column and T in adjacent column. I tried with this code but this code is not separating duplicates i mean if A/A in first column and 2nd column it is separating A/A in 1st column only. please check attached file for better understanding of my problem.
    Please Login or Register  to view this content.
    Thanking you very much for your help and any help in this regard will be highly appreciated
    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,873

    Re: How to separating text in cell into separate columns?

    employing power query, here is the Mcode

    Please Login or Register  to view this content.
    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

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: How to separating text in cell into separate columns?

    or... just for fun (I'm bored...) using a formula:

    =MID(INDEX($A3:$C3,1+INT((COLUMNS($A:A)-1)/2)),CHOOSE(1+MOD((COLUMNS($A:A)-1),2),1,3),1)

    copy across and down.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: How to separating text in cell into separate columns?

    For the data uploaded
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-09-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: How to separating text in cell into separate columns?

    Thanks jindon for your help. Your suggestion working perfect as per my needs.

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

    Re: How to separating text in cell into separate columns?

    You are welcome.

    If the 1st row is just a dummy header then delete the 1st row and change 2 to 1
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-09-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: How to separating text in cell into separate columns?

    Thanks Jindon
    I am getting some error here
    Please Login or Register  to view this content.
    i have more than 8000 columns and i tried to use this code and i got this error
    run-time error:'1004'
    application defined or object defined error
    but this code is working with less number of columns

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

    Re: How to separating text in cell into separate columns?

    Number of columns are 16384, so you can have 8192 columns maximum.
    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: How to separating text in cell into separate columns?

    While I was creating this code and writing my response, I see you posted that you have need to processes way more columns than my code would be able to handle, so you can ignore what is below.

    If you are interested, here is a slightly more compact macro which only uses a single loop to do what you asked for...
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 10-19-2020 at 12:39 PM.

+ 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] Separating data column with English and Chinese Text into 2 separate columns
    By bkzd1989 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-09-2023, 08:46 AM
  2. Separating text and numbers into separate columns
    By kebab in forum Excel General
    Replies: 2
    Last Post: 08-16-2017, 01:29 PM
  3. [SOLVED] Separating numbers & text from the same cell into two columns
    By twaard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-27-2015, 08:29 AM
  4. Separating lastname + suffix to separate columns
    By 2by4 in forum Excel General
    Replies: 6
    Last Post: 03-20-2014, 01:12 AM
  5. Separating text of different length in one cell into different columns
    By ExcelKook in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2011, 06:12 PM
  6. Replies: 3
    Last Post: 05-10-2010, 12:14 PM
  7. Replies: 3
    Last Post: 05-03-2010, 11:23 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