Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David
 
Posts: n/a
Default combine 2 columns

Hallo,

I have 2 columns:

A1
123456 ABCDE
654321 XYZ
098765 XZYZYZYZ

B1
abc
ab
a

I need to combine both and then copy the result to a txt file.
The condition is that A1 should have a fixed width like 20 spaces and then
begin B1 in the txt file.

Result in the txt file:

123456 ABCDE ABC
654321 XYZ AB
098765 XZYZYZYZ A

Any help? Thanks in Advance.

David

  #2   Report Post  
bj
 
Posts: n/a
Default

try
=A1 & rept(" ",20-len(A1)) & B1

"David" wrote:

Hallo,

I have 2 columns:

A1
123456 ABCDE
654321 XYZ
098765 XZYZYZYZ

B1
abc
ab
a

I need to combine both and then copy the result to a txt file.
The condition is that A1 should have a fixed width like 20 spaces and then
begin B1 in the txt file.

Result in the txt file:

123456 ABCDE ABC
654321 XYZ AB
098765 XZYZYZYZ A

Any help? Thanks in Advance.

David

  #3   Report Post  
David
 
Posts: n/a
Default

Thanks man, wonderful!!

It is deceiving before pasting the result in the txt file. The result looks
like this
in Excel:

123456 ABCDE abc
654321 XYZ ab
098765 XZYZYZYZ a

When copy/pasting it in a txt file:

123456 ABCDE abc
654321 XYZ ab
098765 XZYZYZYZ a

Thanks,
David

"bj" wrote:

try
=A1 & rept(" ",20-len(A1)) & B1

"David" wrote:

Hallo,

I have 2 columns:

A1
123456 ABCDE
654321 XYZ
098765 XZYZYZYZ

B1
abc
ab
a

I need to combine both and then copy the result to a txt file.
The condition is that A1 should have a fixed width like 20 spaces and then
begin B1 in the txt file.

Result in the txt file:

123456 ABCDE ABC
654321 XYZ AB
098765 XZYZYZYZ A

Any help? Thanks in Advance.

David

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

When I read your post, the excel sample looks nicer!

You may want to format that column using a nice fixed width font. (I use
Courier New.)



David wrote:

Thanks man, wonderful!!

It is deceiving before pasting the result in the txt file. The result looks
like this
in Excel:

123456 ABCDE abc
654321 XYZ ab
098765 XZYZYZYZ a

When copy/pasting it in a txt file:

123456 ABCDE abc
654321 XYZ ab
098765 XZYZYZYZ a

Thanks,
David

"bj" wrote:

try
=A1 & rept(" ",20-len(A1)) & B1

"David" wrote:

Hallo,

I have 2 columns:

A1
123456 ABCDE
654321 XYZ
098765 XZYZYZYZ

B1
abc
ab
a

I need to combine both and then copy the result to a txt file.
The condition is that A1 should have a fixed width like 20 spaces and then
begin B1 in the txt file.

Result in the txt file:

123456 ABCDE ABC
654321 XYZ AB
098765 XZYZYZYZ A

Any help? Thanks in Advance.

David


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i combine three columns in excel. excel help Excel Worksheet Functions 4 September 24th 05 08:00 PM
how to combine several columns into a single column jims Excel Discussion (Misc queries) 9 August 15th 05 12:00 PM
How to combine two columns? Robert Judge Excel Worksheet Functions 1 May 23rd 05 06:54 PM
How do you combine two columns to one? Help!!!!!! sttrumpet Excel Discussion (Misc queries) 2 March 23rd 05 01:04 AM
combine columns RDB Excel Worksheet Functions 3 March 15th 05 04:07 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"