Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 5 of 5

Thread: Inserting text seperated by commas.

  1. #1
    Join Date
    9th July 2006
    Posts
    13

    Inserting text seperated by commas.

    Can someone please help me with this issue. I need to insert text seperated by commas into excel. Text goes something like this:

    go,back
    run,hide
    jump,dive
    etc.....

    I need to insert the text so that go, run and jump are in column 1 and back, hide and dive are in row two. I used to know how to do this but I forgot.

    Thanks,
    Ron

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    27th July 2006
    Location
    Baltic States (LT/LV/EE)
    Posts
    13

    Re: Inserting text seperated by commas.

    In VB this code inserts text (comma delimited) file into new worksheet:

    VB:
    Set ws = Worksheets.Add 
     '/Importing text file:
     '/get file name from user
    sFile = Application.GetOpenFilename( _ 
    fileFilter:="CSV (comma delimited) (*.csv), *.csv, Text Files (*.txt), *.txt, All Files (*.*), *.*", FilterIndex:=1, _ 
    Title:="Copy Text File To Worksheet") 
    If sFile <> False Then 
         
         '/Import
        Workbooks.OpenText Filename:=sFile, Comma:=True 
         '\import text to temporary worksheet
        ActiveSheet.UsedRange.Select 
         '/select imported text in temporary workbook
        Selection.Copy '/copy to clipboard
        ActiveWorkbook.Close '/close temporary workbook
         
        ws.Range("A2").Select 
        ActiveSheet.Paste 
        m = ActiveSheet.UsedRange.Columns.Count 
        n = ActiveSheet.UsedRange.Rows.Count 
         '/paste text into your workbook
    End If 
    
    
    Without VB, just go to menu>data>get external data>import text file

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    31st January 2003
    Location
    Portsmouth, UK
    Posts
    748

    Re: Inserting text seperated by commas.

    Few ways, either open the txt file from excel and you should start the wizard that will allow you to specify how you want to treat the data.

    Have a look at DATA>>>GET EXTERNAL DATA>>>IMPORT TEXT FILE

    Or paste it in and then look at the DATA>>>TEXT TO COLUMNS option..

    D

    Better a bad day on the water than a good day in the office

  4. #4
    Join Date
    26th January 2003
    Location
    Derbyshire,UK
    Posts
    18,505

    Re: Inserting text seperated by commas.

    Do you mean you have text in comma separated values format, ie each cell contains say run,jump - etc?

    If so you can use Text to Columns from the Data Menu and select comma as the delimiter
    Hope that Helps

    Roy

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    Where to paste code from the Forum

    About me.

  5. #5
    Join Date
    9th July 2006
    Posts
    13

    Re: Inserting text seperated by commas.

    This "Have a look at DATA>>>GET EXTERNAL DATA>>>IMPORT TEXT FILE" works great!!! Thanks alot guys!

    Ron
    Last edited by forumwatcher; July 29th, 2006 at 13:11.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Lookup & Combine Names Seperated With Commas
    By MaxTO in forum EXCEL HELP
    Replies: 3
    Last Post: October 31st, 2008, 09:45
  2. Prevent Multiple Commas In Text File
    By deewan in forum EXCEL HELP
    Replies: 9
    Last Post: December 1st, 2007, 09:10
  3. Difference Between 2 Text Dates With Commas
    By collegee in forum EXCEL HELP
    Replies: 8
    Last Post: October 5th, 2007, 13:03
  4. Export Data To Text: Space After Commas
    By Yoman in forum EXCEL HELP
    Replies: 2
    Last Post: November 10th, 2006, 03:57
  5. Replies: 3
    Last Post: January 19th, 2005, 17:13

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
  •  
porno