Aligning Text in Comments

XLML

Active Member
Joined
Aug 15, 2003
Messages
407
Is there any way to left align text (3 columns) separated by spaces?

Thanks in advance,
XLML
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

jdee

Active Member
Joined
Sep 10, 2003
Messages
276
Not sure I'm following you. Do you mean you have column a, b and c, and you want to align the text that is in each. Then, just format, cells, alignment, left.

Or, do you mean you want text that is in colm. a, separated into colms. a, b. and c. Then, Data, text to columns, deliminted, choose space.
 

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829
Could you post an example of what you have and what you want?
 

XLML

Active Member
Joined
Aug 15, 2003
Messages
407
Thanks for the replies.

I would like to manipulate all comments in a worksheet.

Lets say I have inserted a comment in cell A1 with the following data:

"State" "City" "TimeZone"
"Delaware" "Wilmington" "Eastern"
"California" "Fresno" "Pacific

I would like to align all columns in the comment. The only thing separating all words is a variable number of spaces.

"State" "City" "TimeZone"
"Delaware" "Wilmington "Eastern"
"California" "Fresno" "Pacific
 

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829

ADVERTISEMENT

Try changing the font to Arial or Tahoma.
 

XLML

Active Member
Joined
Aug 15, 2003
Messages
407
Changing the font wont work. There are 3 columns of data in the comment manually keyed in. I use the space bar to separte values - the problem is I'm not consistent with the number of spaces used. Can a macro do the aligning for me on comments already entered?

Thanks,
XLML
 

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829

ADVERTISEMENT

Sorry about my previous suggestions. But, pleas do try to edit the comment by changing its font to Courier. I tried two lines:

ABC 2 spaces, FGH, 2 spaces, and KLM
III 2 spaces, III 2 spaces, and III

and I saw each character of line 1 perfectly aligned with each character of line 2.

There are other fonts that use the "equal spacing" for each character. You might give it a try.

Edited later:
I found the following fonts all use equal spacing for all characters, including spaces and punctuation:
Courier, FixedSys, Letter Gothic, Lucida Console, Terminal, or any of the "West" group of fonts.
 

XLML

Active Member
Joined
Aug 15, 2003
Messages
407
Thanks for the reply Ralph. I formatted comments using 2 of the fonts suggested and nothing moved or left aligned.

XLML
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,048
Office Version
  1. 365
Platform
  1. Windows
XLML

I'm sure this is possible but I'm also pretty sure that it would involve some pretty complicated code.

You would need to calculate the amount of spaces to add between items based on various factors, eg length of longest item in column
 

Watch MrExcel Video

Forum statistics

Threads
1,118,234
Messages
5,571,042
Members
412,358
Latest member
Eng Muhammed
Top