ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Aligning within a cell (https://www.excelbanter.com/excel-worksheet-functions/121540-aligning-within-cell.html)

Squeaky

Aligning within a cell
 
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box from
the forms menu. Since the information in each row is a different length is
there any way to make the drop down box display the information as such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of each
letter still made it look crooked.

Thanks,

Squeaky

T. Valko

Aligning within a cell
 
Use a combo box from the control toolbox and use a fixed width font like
Courier.

Biff

"Squeaky" wrote in message
...
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box from
the forms menu. Since the information in each row is a different length is
there any way to make the drop down box display the information as such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of each
letter still made it look crooked.

Thanks,

Squeaky




T. Valko

Aligning within a cell
 
P.S.

You have to set the font property of the combo box.

Biff

"T. Valko" wrote in message
...
Use a combo box from the control toolbox and use a fixed width font like
Courier.

Biff

"Squeaky" wrote in message
...
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box
from
the forms menu. Since the information in each row is a different length
is
there any way to make the drop down box display the information as such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be
able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of
each
letter still made it look crooked.

Thanks,

Squeaky






Squeaky

Aligning within a cell
 
Thanks for the respose.

I cannot use the control toolbox combo box because I cannot have macros.

Squeaky

"T. Valko" wrote:

P.S.

You have to set the font property of the combo box.

Biff

"T. Valko" wrote in message
...
Use a combo box from the control toolbox and use a fixed width font like
Courier.

Biff

"Squeaky" wrote in message
...
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box
from
the forms menu. Since the information in each row is a different length
is
there any way to make the drop down box display the information as such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be
able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of
each
letter still made it look crooked.

Thanks,

Squeaky







T. Valko

Aligning within a cell
 
No macros needed. See this screencap:

http://img163.imageshack.us/img163/3623/alignjk2.jpg

Enter this formula in D1 as an array using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=A1&REPT(" ",MAX(LEN(A$1:A$8))-LEN(A1)+2)&B1

You can adjust the number of spaces between the words by changing the +2 to
whatever.

Format the cell to use a fixed width font. In the screencap I used Courier
New. Copy down as needed.

Set up the combo box from the control tool box and set the font property to
Courier New and use the range D1:Dn as the ListFillRange.

Biff

"Squeaky" wrote in message
...
Thanks for the respose.

I cannot use the control toolbox combo box because I cannot have macros.

Squeaky

"T. Valko" wrote:

P.S.

You have to set the font property of the combo box.

Biff

"T. Valko" wrote in message
...
Use a combo box from the control toolbox and use a fixed width font
like
Courier.

Biff

"Squeaky" wrote in message
...
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box
from
the forms menu. Since the information in each row is a different
length
is
there any way to make the drop down box display the information as
such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be
able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of
each
letter still made it look crooked.

Thanks,

Squeaky








Squeaky

Aligning within a cell
 
That's cool. The issue I had with the Macros is if you accidentally select
"view code" instead of "properties" it opens the VBA box. Even if I close it
immediately from that time on I get the enable/disable macros box when the
spreadsheet is opened. I got tired of dealing with it so I decided to only
use the forms box.

Phil

"T. Valko" wrote:

No macros needed. See this screencap:

http://img163.imageshack.us/img163/3623/alignjk2.jpg

Enter this formula in D1 as an array using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=A1&REPT(" ",MAX(LEN(A$1:A$8))-LEN(A1)+2)&B1

You can adjust the number of spaces between the words by changing the +2 to
whatever.

Format the cell to use a fixed width font. In the screencap I used Courier
New. Copy down as needed.

Set up the combo box from the control tool box and set the font property to
Courier New and use the range D1:Dn as the ListFillRange.

Biff

"Squeaky" wrote in message
...
Thanks for the respose.

I cannot use the control toolbox combo box because I cannot have macros.

Squeaky

"T. Valko" wrote:

P.S.

You have to set the font property of the combo box.

Biff

"T. Valko" wrote in message
...
Use a combo box from the control toolbox and use a fixed width font
like
Courier.

Biff

"Squeaky" wrote in message
...
I have two columns of cells I have joined together with the &. This 3rd
column is then displayed on a second page using a drop down combo box
from
the forms menu. Since the information in each row is a different
length
is
there any way to make the drop down box display the information as
such:

Chevrolet Cobalt
Ford Areostar
Mazda Miata
Toyota Tundra

Where the second column is aligned as well as the first? I need to be
able
to do this with a formula if possible since there are over a thousand
entries. I tried adding 20 blanks or underscores to the first column,
trimming it, then adding to the 2nd column, but the varying widths of
each
letter still made it look crooked.

Thanks,

Squeaky










All times are GMT +1. The time now is 07:16 PM.

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