ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can i specify a cell to have a fixed number of characters (https://www.excelbanter.com/excel-discussion-misc-queries/68318-how-can-i-specify-cell-have-fixed-number-characters.html)

john dunford

How can i specify a cell to have a fixed number of characters
 
I need to concatenate text from 4 cells so that in the final string the text
from each cell is padded up to a length of 40 characters.
any ideas?
--
john

Dave Peterson

How can i specify a cell to have a fixed number of characters
 
=left(a1&rept(" ",40),40)&left(b1&rept(" ",40),40) & .....

If you have numbers/dates, you may want:

=right(rept(" ",40)&text(a1,"mm/dd/yyyy"),40) & .....

john dunford wrote:

I need to concatenate text from 4 cells so that in the final string the text
from each cell is padded up to a length of 40 characters.
any ideas?
--
john


--

Dave Peterson


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com