LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Fixed length string of text

On Saturday, 17 April 2010 08:31:02 UTC+12, Gary Brown wrote:
Assuming you want the Last name to be exactly 9 characters...
=CONCATENATE(A1,B1,C1&IF(LEN(C1)<=9,REPT(" ",9-LEN(C1)),""),D1)
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"MWysack" wrote:

Hello,
I am trying to create strings of text by combining cells using CONCATENATE.
I need to have each string of text to be the same length. Below are some
examples of the text strings:

A1= 0000001
B1=123456789
C1= Doe
D1= John

A2=0000002
B2=987654321
C2=Smith
D2=John

In need the lines to look like this:
0000001123456789Doe John
0000002987654321Smith John

This is what they look like when I use CONCATENATE:
0000001123456789DoeJohn
0000002987654321SmithJohn

Is there anyway to get these strings of text to look like this without
manually adding the spaces for each line?

Thanks,
Megan


This solution just worked fantastically for me - thanks
 
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
Creating sequential text string of fixed length dhstein Excel Discussion (Misc queries) 7 December 10th 08 03:52 AM
Text to column fixed length Luci Excel Discussion (Misc queries) 6 November 27th 08 06:27 PM
Fixed Length, Text Formatted Novice2000 Excel Discussion (Misc queries) 2 May 13th 08 06:06 PM
creating numbers to a fixed length string... ds Excel Worksheet Functions 4 July 5th 07 01:06 AM
fixed string length,even other record is copied viv Excel Discussion (Misc queries) 0 May 30th 05 08:28 PM


All times are GMT +1. The time now is 05:06 PM.

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"