adding invisible characters to list to make lines similar lo

ylijohe

Board Regular
Joined
Sep 6, 2002
Messages
58
My program makes lists of stocks, and I give those lists for instance on message rooms. It would be nice if excel would format all names similar long, so that the list would show neatly in internet...

is this possible to solve?

Done Solutions Oyj -20,00 %
Tekla Oyj -10,73 %
Vacon Oyj -9,71 %
M-real Oyj A -8,63 %
TJ Group Oyj -7,14 %
Tecnomen Oyj -6,67 %
SSH Communications Securi. -6,12 %
Okmetic Oyj -5,77 %
Wecan Electronics Oyj -5,71 %
OKO Osuuspankkien Keskusp. -4,79 %
Rautaruukki Oyj K -4,75 %
Jippii Gr. (Tark.listalla) -4,55 %
Neomarkka Oyj B -4,35 %
Etteplan Oyj -4,35 %
Finnlines Oyj -4,21 %
Endero Oyj 33,33 %
Solteq Oyj 9,26 %
Wärtsilä Oyj Abp A 8,91 %
SanomaWSOY Oyj A 7,50 %
Sonera Oyj 7,07 %
Teleste Oyj 5,60 %
Hackman Oyj Abp A 4,62 %
Sampo Oyj A 4,29 %
Ilkka-Yhtymä Oyj 1 3,51 %
Nokia Oyj 3,47 %
Elektrobit Group Oyj 3,45 %
SanomaWSOY Oyj B 3,26 %
Kylpyläka. (Tark.listalla) 3,14 %
Tietoenator Oyj 2,95 %
Biohit Oyj B 2,78 %

I could do this much...

by using
this kind of space characters...(now I am not sure if they sho here):(editing: the code can be seen if you right click "show source code"... )

Tekla Oyj   -10,73 %

Vacon Oyj   -9,71 %

M-real Oyj A   -8,63 %

TJ Group Oyj   -7,14 %

Tecnomen Oyj   -6,67 %


Does anybody have any suggestions?
This message was edited by ylijohe on 2002-10-01 14:47
This message was edited by ylijohe on 2002-10-01 14:48
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

kkknie

Well-known Member
Joined
Apr 29, 2002
Messages
677
If you are looking to make things nice in HTML view, you can either use tables or the PRE tag and a fixed font.

Tables are a long story. You could look into some websites on beginning HTML. I will not even begin to try to explain.

HTML (internet) ignores blank spaces, so everything gets compressed. If you preface your list with the <PRE> tag and format your output in Courier (or system or ansi), it will display exactly as you see it on your screen.

I suggest you browse some HTML sites for more info...

K
 

ylijohe

Board Regular
Joined
Sep 6, 2002
Messages
58
Yes if I would make HTML-pages, I could use tables and so on, BUT now I merge some html code to this message to make some empty spaces between words, just to show that it is possible:Tietoenator Oyj            2,95 %
This empty space was achieved by adding 12 pieces of chr 160 between the word and the value.....what I am looking for is a formula to count just exact amount of chr 160 to make a list neat in the way that the values are lined vertically, without tables ...My aim is just to make it possible to copypaste the list sraight from my excel program, as, I believe, it is possible to add those space characters to text line in excell, as I just have proved. The question is how to calculate them according to the different lenghts of the words to be listed?
This message was edited by ylijohe on 2002-10-01 16:48
 

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
might something like the following work?

Say you wanted them all tobe, eg, 30 characters long. You could split up the string, do some lenght checks & use the rept() function to insert spaces...

=LEFT(A2,FIND("-",A2,1)-1)&REPT(" ",30-LEN(A2))&RIGHT(A2,LEN(A2)-(FIND("-",A2,1)-1))

see the example:
Book1
ABCD
1SourceLenResultLen
2TeklaOyj-10,73%20TeklaOyj-10,73%30
3VaconOyj-9,71%19VaconOyj-9,71%30
4M-realOyjA-8,63%22M-realOyjA-8,63%30
5TJGroupOyj-7,14%22TJGroupOyj-7,14%30
6TecnomenOyj-6,67%22TecnomenOyj-6,67%30
7
Sheet1



as constructed, this needs refinement to deal with multiple occurances of - in the string (see c4) - we can deal with this if the approach is OK...

Paddy
 

ylijohe

Board Regular
Joined
Sep 6, 2002
Messages
58
This is exactly what I´m looking for. I make some test now.

Thank you!!!!

some results:Tekla Oyj                                             -10,73 %

Vacon Oyj                                               -9,71 %

Mreal Oyj A                                           -8,63 %

TJ Group Oyj                                         -7,14 %

Tecnomen Oyj                                         -6,67 %

SSH Communications Securi.             -6,12 %

Okmetic Oyj                                           -5,77 %

Wecan Electronics Oyj                       -5,71 %

OKO Osuuspankkien Keskusp.             -4,79 %

Rautaruukki Oyj K                               -4,75 %

Jippii Gr. (Tark.listalla)             -4,55 %

Neomarkka Oyj B                                   -4,35 %

Etteplan Oyj                                         -4,35 %

Finnlines Oyj                                       -4,21 %
This message was edited by ylijohe on 2002-10-01 18:27
 

Forum statistics

Threads
1,144,360
Messages
5,723,902
Members
422,525
Latest member
dsenff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top