+ Reply to Thread
Results 1 to 16 of 16

Split them ,, each one in its own column ! , how can I do it ?

  1. #1
    Registered User
    Join Date
    10-03-2020
    Location
    Istanbul
    MS-Off Ver
    2016
    Posts
    19

    Split them ,, each one in its own column ! , how can I do it ?

    Hello everyone!
    I have the date in a column , and the time in another column , I am using google sheet,

    2021.02.01 13:00:00

    I have a simple requirement to split each number in the above line and place each one in a separate column ,

    would be like that:

    |2|0|2|1|0|2|0|1|1|3|0|0|0|0

    any idea how to reach that ?

    Thanks in advance

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    If that's actually text that looks a bit like a date and time, try this dragged across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If it's a true date and time, try this dragged across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    I had a little trouble deciding how to handle the mixture of string and date (time). But here is some code if yow want vba.

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    @JLGWhiz: will this code work in Google Sheets?

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Quote Originally Posted by TMS View Post
    @JLGWhiz: will this code work in Google Sheets?
    Have no idea, have never used google sheets. But it works in Excel.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    JLGWhiz:
    ... have never used google sheets ...
    Me neither, but that appears to be what the OP is using

    ... am using google sheet

  7. #7
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Well, the OP posted on an Excel forum, so I assume the Google sheet is imported to Excel. The code should still work.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Maybe not ... For Other Platforms(Mac, Google Docs, Mobile OS etc)

  9. #9
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Quote Originally Posted by TMS View Post
    Maybe not ... For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Well, it is up to the user to convert from vba ro Google script if that is what it takes. My expertise is limited to Excel and VBA, and I stress limited.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    I'm not making an issue of it. I just asked the question (based on the OP's stated environment).

    I've offered formula solutions which I assume will work in Google sheets, but I don't know for sure.

    Probably best if we wait for the OP to let us know what, if anything, works for him/her.

  11. #11
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    No, I didn't take issue with the question, but I thought for arguments sake that if people post on an Excel forum and expect to get results in another application's format and/or programming language, then it needs to be made clear that, at least in my case, that won't happen. If a user imports data from another source into Excel then I will work with them to resolve their issues within the scope of Excel (and some other Microsoft applications). But not being a professional programmer, I do not study nor use programming languages from the various applications that might interface with the Microsoft applications. I see many specialized apps for use on websites to read or extract data, some written in Java script, but I have never had the inclination to try and become proficient at interpreting vba to other languanges and vice versa. At my age, I see no advantage to it.
    Last edited by JLGWhiz; 02-03-2021 at 07:35 PM.

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Ah, go on, a "retired old geezer" can"t be that old . I'll be seventy this year but I only realise that when I say it or write it down. Or do anything energetic. Or try to understand Power Query

  13. #13
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Split them ,, each one in its own column ! , how can I do it ?

    My retirement year was in 2000 with full benefits. At age 70 I was still spry and active. Not so much anymore. But thankfully, the mind still clicks along enough to compile some decent code occasionally.
    Regards, JLG

  14. #14
    Registered User
    Join Date
    10-03-2020
    Location
    Istanbul
    MS-Off Ver
    2016
    Posts
    19

    Thumbs up Re: Split them ,, each one in its own column ! , how can I do it ?

    that helped me a lot , it was little longer but it did the job , I can't post here the google sheet to show you , but that below one helped me to handle the ":"when it was coming as a second digit in the time column:
    =if(MID(B24,2,1) = ":","0",(MID(B24,2,1))
    how to mark this as resolved ?

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    You're welcome.

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Split them ,, each one in its own column ! , how can I do it ?

    Thanks for the rep.

+ 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] Concatenate Text in Column B Split in Multiple Rows for Each Number in Column A
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2020, 03:51 AM
  2. split excel sheet based on column filter with protected column
    By rishikrsaw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-23-2019, 03:33 AM
  3. Replies: 3
    Last Post: 11-08-2019, 01:54 PM
  4. [SOLVED] PowerQuery - Split column into multiple columns based on another column
    By Bassehave in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2019, 09:48 AM
  5. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  6. Replies: 3
    Last Post: 08-19-2014, 10:24 AM
  7. [SOLVED] Split One Column at Delimiter While Copying Contents of Second Column to Populate New Rows
    By medailSacrosanct in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-01-2012, 11:37 AM

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