Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2012, 05:13 AM
diouna diouna is offline Import from variable length text Windows 7 64bit Import from variable length text Office 2010 32bit
Novice
Import from variable length text
 
Join Date: Jul 2012
Posts: 2
diouna is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 07-10-2012, 08:38 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Import from variable length text Windows 7 64bit Import from variable length text Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,766
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

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
Reply With Quote
  #3  
Old 07-10-2012, 12:04 PM
diouna diouna is offline Import from variable length text Windows 7 64bit Import from variable length text Office 2010 32bit
Novice
Import from variable length text
 
Join Date: Jul 2012
Posts: 2
diouna is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 07-10-2012, 09:43 PM
macropod's Avatar
macropod macropod is offline Import from variable length text Windows 7 64bit Import from variable length text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

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
Import from variable length text macro, data import from the ONLY text file in current folder ue418 Excel Programming 5 10-28-2017 12:52 PM
Import from variable length text 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 from variable length text Import Text from File - Line Spacing marshalx Word 2 10-28-2009 02:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft