Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Concatenate and include trailing blanks

Hi,

I need to concatenate three seperate Text fields in to one long string, but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Concatenate and include trailing blanks

Hi

=A1&REPT(" ",30-LEN(A1))&B1&REPT(" " ,30-LEN(B1))&C1&REPR(" ",30-LEN(C1))

--
Regards
Roger Govier

"Mr_Wilf" wrote in message
...
Hi,

I need to concatenate three seperate Text fields in to one long string,
but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly
Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?

__________ Information from ESET Smart Security, version of virus
signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Concatenate and include trailing blanks

Sorry, typo in previous post

last REPR should have been REPT

=A1&REPT(" ",30-LEN(A1))&B1&REPT(" " ,30-LEN(B1))&C1&REPT(" ",30-LEN(C1))

--
Regards
Roger Govier

"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi

=A1&REPT(" ",30-LEN(A1))&B1&REPT(" " ,30-LEN(B1))&C1&REPR(" ",30-LEN(C1))

--
Regards
Roger Govier

"Mr_Wilf" wrote in message
...
Hi,

I need to concatenate three seperate Text fields in to one long string,
but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?

__________ Information from ESET Smart Security, version of virus
signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus
signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Concatenate and include trailing blanks

Looking good - many thanks

"Roger Govier" wrote:

Sorry, typo in previous post

last REPR should have been REPT

=A1&REPT(" ",30-LEN(A1))&B1&REPT(" " ,30-LEN(B1))&C1&REPT(" ",30-LEN(C1))

--
Regards
Roger Govier

"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi

=A1&REPT(" ",30-LEN(A1))&B1&REPT(" " ,30-LEN(B1))&C1&REPR(" ",30-LEN(C1))

--
Regards
Roger Govier

"Mr_Wilf" wrote in message
...
Hi,

I need to concatenate three seperate Text fields in to one long string,
but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?

__________ Information from ESET Smart Security, version of virus
signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus
signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4533 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com



.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Concatenate and include trailing blanks

Another way:
=left(a1&rept(" ",30),30) & left(b1&rept(" ",30),30) & left(c1&rept(" ",30),30)

If you ever have numbers that need to be formatted nicely (dates, times,
money??), you could use:

=left(text(a1,"$#,##0.00")&rept(" ",30),30) & ...



Mr_Wilf wrote:

Hi,

I need to concatenate three seperate Text fields in to one long string, but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Concatenate and include trailing blanks

Thanks for answering - have gone with Roger's technique but logged yours in
my notes

"Dave Peterson" wrote:

Another way:
=left(a1&rept(" ",30),30) & left(b1&rept(" ",30),30) & left(c1&rept(" ",30),30)

If you ever have numbers that need to be formatted nicely (dates, times,
money??), you could use:

=left(text(a1,"$#,##0.00")&rept(" ",30),30) & ...



Mr_Wilf wrote:

Hi,

I need to concatenate three seperate Text fields in to one long string, but
keeping each value to 30 char.

eg
A1 "999 Letsbe Avenue"
B1 "Little Doing Quickly"
C1 "Abyssinia"

into "999 Letsbe Avenue Little Doing Quickly Abyssinia
"
instead of "999 Letsbe AvenueLittle Doing QuicklyAbyssinia" which is what
I'm getting.

Any suggestions?


--

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
Create a simple average that does NOT include blanks cells Access Joe Excel Worksheet Functions 4 October 17th 07 09:26 PM
Using concatenate to include a line return dan Excel Discussion (Misc queries) 1 January 26th 06 01:52 PM
Concatenate and remove blanks PeterW Excel Worksheet Functions 3 January 19th 06 06:04 PM
Include date in concatenate statement Ken G. Excel Discussion (Misc queries) 3 October 13th 05 05:12 AM
Trailing blanks SAS Excel Discussion (Misc queries) 2 January 7th 05 09:42 PM


All times are GMT +1. The time now is 03:14 AM.

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

About Us

"It's about Microsoft Excel"