PC Review


Reply
Thread Tools Rate Thread

Col alignment problem

 
 
=?Utf-8?B?bmV3YmllIGluIGhlbGw=?=
Guest
Posts: n/a
 
      22nd Feb 2007
Suppose I have a text file like this

Name Wage
Robert 123
John 111,34
Mike 222,55

When I open the text file I get on Excel:

Name Wage
Robert 123
John 111,34
Mike 222,55

Notice that we use Commas as decimal points.
The actual problem is that excel doesn't know how to align numbers when
opening text files.

Can any one help?
I use Excel 2000 o Excel 2003.

Thank you.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TVN3ZWV0RzIyMg==?=
Guest
Posts: n/a
 
      22nd Feb 2007
Hello newbie,

Are you opening the text file with vba or by hand?

If by hand, your Data | Text to Columns | Delimited may not be cleared out.


If by vba, consider:

Workbooks.OpenText FileName:= "MyFileName.txt", Origin:=xlMSDOS, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlNone, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False,
Comma:=False _
, Space:=False, OTHER:=False, FieldInfo:=Array(1, 1)

Hope that works for you.
Good Luck.

--
Thx
MSweetG222



"newbie in hell" wrote:

> Suppose I have a text file like this
>
> Name Wage
> Robert 123
> John 111,34
> Mike 222,55
>
> When I open the text file I get on Excel:
>
> Name Wage
> Robert 123
> John 111,34
> Mike 222,55
>
> Notice that we use Commas as decimal points.
> The actual problem is that excel doesn't know how to align numbers when
> opening text files.
>
> Can any one help?
> I use Excel 2000 o Excel 2003.
>
> Thank you.
>
>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      22nd Feb 2007
When you open the text file you should get the Text Import Wizard pop.

In step 3 under Column Data Format select Text for the second column.


Gord Dibben MS Excel MVP

On Thu, 22 Feb 2007 14:40:58 -0800, newbie in hell
<(E-Mail Removed)> wrote:

>Suppose I have a text file like this
>
>Name Wage
>Robert 123
>John 111,34
>Mike 222,55
>
>When I open the text file I get on Excel:
>
>Name Wage
>Robert 123
>John 111,34
>Mike 222,55
>
>Notice that we use Commas as decimal points.
>The actual problem is that excel doesn't know how to align numbers when
>opening text files.
>
>Can any one help?
>I use Excel 2000 o Excel 2003.
>
>Thank you.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Cell alignment, how do I update the default vertical alignment How to update default cell alignment Microsoft Excel Setup 2 4th Feb 2009 02:25 PM
alignment problem jules Microsoft Word New Users 3 11th Apr 2008 10:15 PM
Alignment Problem in IE =?Utf-8?B?UmFqZXNoIEtoYXRyaQ==?= Windows XP Internet Explorer 2 25th Dec 2006 12:50 PM
Alignment problem oscar Microsoft Frontpage 9 11th Feb 2006 06:12 PM
Alignment problem =?Utf-8?B?TEw=?= Microsoft Outlook Discussion 0 2nd Nov 2005 03:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 AM.