#1
|
|||
|
|||
Import from variable length text
Hi,
I'm trying to import from a text file but I can't separate in columns correctly. The data is much like this: 0000 NAME NAME NAME 000 000 0000 NAME NAME 000 000 0000 NAME NAME NAME NAME 000 000 I need the full name on one column. But using space as separation delimiter gives me: 0000|NAME| NAME| NAME| 000 | 000 0000|NAME| NAME| 000 | 000 | 0000|NAME| NAME| NAME| NAME| 000| 000 can anyone help me? |
#2
|
||||
|
||||
Do you mean the three or more names are to be in the same cell?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
What I mean is:
0001 Firstname Middlename Lastname 5434500 0002 Firstname Lastname 4500500 0003 Firstname Middlename SecondMidname Lastname 100 The name length is variable (obviously) and everything is separated by single spaces. I want column A to contain the person count, B to contain all names and C, the number: 0001| Firstname Middlename Lastname _____________ | 5434500| 0002| Firstname Lastname_________________________ | 4500500| 0003| Firstname Middlename SecondMidname Lastname | 100 | By choosing space as delimiter, I can't put an entire name in a cell. Each name occupies a cell. Excel's import dialog doesn't seem to give this option. |
#4
|
||||
|
||||
Excel cannot tell which parts of your data are which. If you use spaces as the separators, each word necesarily goes into a new column. Since you apparently have numbers, then text, then more numbers, you could pre-process the data in Word, using Find/Replace to add tabs between the numbers and text. In Excel, you could then use the tabs as the separators.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
import from text |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to import multiple text file data into word | mizankabir | Word VBA | 7 | 09-15-2023 10:27 PM |
macro, data import from the ONLY text file in current folder | ue418 | Excel Programming | 5 | 10-28-2017 12:52 PM |
Run-time error '91': Object variable or With block variable not set | tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |
Import formatted text from Word into PowerPoint | parboy | PowerPoint | 0 | 07-06-2011 08:52 AM |
Import Text from File - Line Spacing | marshalx | Word | 2 | 10-28-2009 02:37 AM |