Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Field length in Cells
Hi,
I am very new to this forum. I have two queries: 1. I have got data in various columns in a work sheet. Each colum contains data from a table(outside excel). I want to copy all the dat in a row to one cell. This I acheived through the formula = A1 & B1-- etc. However I want to maintain the field length of each too. Fo example the first field in my excel file represents a field which is 2 characters long and the next 10 characters long. The data for the firs field is abcd and for the second is 1234. What I want in the cell is ABCD 1234 Is it possible in excel to do this? Thanks & regards, Pau -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Field length in Cells
to right justify
=rept(" ",10-len(trim(a1)))&trim(a1)&rept(" ",10-len(trim(b1))) & trim(B1) to left justify =trim(a1)&rept(" ",10-len(trim(a1)))&trim(B1)&rept(" ",10-len(trim(b1))) -- Regards, Tom Ogilvy "apv98 " wrote in message ... Hi, I am very new to this forum. I have two queries: 1. I have got data in various columns in a work sheet. Each column contains data from a table(outside excel). I want to copy all the data in a row to one cell. This I acheived through the formula = A1 & B1--- etc. However I want to maintain the field length of each too. For example the first field in my excel file represents a field which is 20 characters long and the next 10 characters long. The data for the first field is abcd and for the second is 1234. What I want in the cell is ABCD 1234 Is it possible in excel to do this? Thanks & regards, Paul --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can data be sorted by the length in a field | Excel Worksheet Functions | |||
//sk - Max length of a numeric field. | Excel Worksheet Functions | |||
Pad field length | Excel Discussion (Misc queries) | |||
Field length of VBA totals in Excel 2003 | Excel Discussion (Misc queries) | |||
How do I fix a field length? | Excel Discussion (Misc queries) |