Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Concatenation with Fixed column widths

Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Concatenation with Fixed column widths

For numeric fields like column E, use the TEXT function like this:

=TEXT(E23,"000000")

this will give you 6 characters, with leading zeroes as necessary.

Hope this helps.

Pete

On Feb 20, 3:28 pm, BEEJAY wrote:
Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Concatenation with Fixed column widths

It worked for me, so what is in D23 and E23?

BTW, shouldn't it be

=RIGHT(REPT(" ",10)&D23,10)&RIGHT(REPT(" ",6)&E23,6)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"BEEJAY" wrote in message
...
Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Concatenation with Fixed column widths

Worked, as promised.
Now, it is possible that columns D and E (and even C) could be numeric or
text.
Do I use "TEXT" for each of these?
Is it possible to reverse the alignment so that the number or text is to the
left of the column and (if necessary) a series of dots fills in the rest of
the cell.
This would still make it easy to read.


"Pete_UK" wrote:

For numeric fields like column E, use the TEXT function like this:

=TEXT(E23,"000000")

this will give you 6 characters, with leading zeroes as necessary.

Hope this helps.

Pete

On Feb 20, 3:28 pm, BEEJAY wrote:
Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Concatenation with Fixed column widths

Columns D and E could be either text or numeric.
The following seems to work:
=LEFT(TEXT(D1,"0")&REPT(" ",10),10)&LEFT(TEXT(E1,"0")&REPT(" ",6),6)&C1
Except:
1 A blank cell returns a Zero - Not wanted - Should return a Blank
2: 3 blank cells returns #Value - Also not wanted - Also should return a Blank
Is there a modification to the above, that would accomplish this?

Thanks


"Bob Phillips" wrote:

It worked for me, so what is in D23 and E23?

BTW, shouldn't it be

=RIGHT(REPT(" ",10)&D23,10)&RIGHT(REPT(" ",6)&E23,6)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"BEEJAY" wrote in message
...
Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Concatenation with Fixed column widths

Wake up, BEEJAY;
All those years that mother told me I was the brightest light in the
chandelier ......
Too bad she didn't tell me, I was the only light ............

Changed: "0" to " ". Seems to solve problem # 1
Still would appreciate help on # 2.


"BEEJAY" wrote:

Columns D and E could be either text or numeric.
The following seems to work:
=LEFT(TEXT(D1,"0")&REPT(" ",10),10)&LEFT(TEXT(E1,"0")&REPT(" ",6),6)&C1
Except:
1 A blank cell returns a Zero - Not wanted - Should return a Blank
2: 3 blank cells returns #Value - Also not wanted - Also should return a Blank
Is there a modification to the above, that would accomplish this?

Thanks


"Bob Phillips" wrote:

It worked for me, so what is in D23 and E23?

BTW, shouldn't it be

=RIGHT(REPT(" ",10)&D23,10)&RIGHT(REPT(" ",6)&E23,6)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"BEEJAY" wrote in message
...
Excel 2003: SP2
Greetings: Gleaned info from this ng, but having trouble making it work.

Data in C: Description Column
Data in D: Unit of Measure Column: Fixed width of 10 required
Data in E: QTY Column: Fixed width of 6 required

Concatenated result should be: D & E & C
=LEFT(D23&REPT(" ",10),10) 'This work great.

=LEFT(D23&REPT(" ",10),10) & LEFT(E23&REPT(" ",6),6)
This returns as "Value"

Then I still also need to "add" column C.
Help, please




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
Can I have different column widths below each other Dizzy Des New Users to Excel 3 February 8th 07 12:52 PM
Column Widths Pricklyflower Excel Discussion (Misc queries) 4 March 1st 06 09:48 PM
Different column widths Holyhabanero Excel Worksheet Functions 2 January 18th 06 06:17 PM
Column Widths Alex Mackenzie Excel Worksheet Functions 0 October 20th 05 08:41 PM
Column widths jrpOR Excel Worksheet Functions 2 August 6th 05 01:44 AM


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

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

About Us

"It's about Microsoft Excel"