ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need help concatenating and formulas (https://www.excelbanter.com/excel-discussion-misc-queries/123029-need-help-concatenating-formulas.html)

Arkitek

Need help concatenating and formulas
 
I'm trying to concatenate 2 columns "project name" and "project number".
This is what I would like to do with the following given:
concatenate column width: 32
Project name: Microsoft
Project number: 121212
formula: = '=concatenate(A1," ",A2)
current output = Microsoft 121212 (17 characters)
attempting output = Microsoft 121212 (32 characters)
basically i want to add spaces between the two based on the width of the
column minus the number of characters of the current output (note that each
row will have a different number of characters.
In other terms, i want to push "microsoft" to the far left of the cell and
"121212" to the far right

Can this be done?

Thanks.


Nick Hodge

Need help concatenating and formulas
 
How about

=A1&REPT(" ",32-LEN(A1&B1))&B1

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Arkitek" wrote in message
...
I'm trying to concatenate 2 columns "project name" and "project number".
This is what I would like to do with the following given:
concatenate column width: 32
Project name: Microsoft
Project number: 121212
formula: = '=concatenate(A1," ",A2)
current output = Microsoft 121212 (17 characters)
attempting output = Microsoft 121212 (32 characters)
basically i want to add spaces between the two based on the width of the
column minus the number of characters of the current output (note that
each
row will have a different number of characters.
In other terms, i want to push "microsoft" to the far left of the cell and
"121212" to the far right

Can this be done?

Thanks.




All times are GMT +1. The time now is 09:20 AM.

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