Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How to transform float to percentages within an array?

Hi newsgroup,

I produced an array containing floaters between 0 and 1
calculated as a percentage, e.g. 0,8888788888.

If I try to use them as the Text of a Text Box, this Box
shows the floater but I need to show the percentage in the
format "88,88 %". Do you know how I can transform these
array entries to the format needed?

Thanks in advance and best regards,

Markus
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to transform float to percentages within an array?

Textbox1.Text = Replace(Format(varr(i,"#0.00 %"),".",",")

--
Regards,
Tom Ogilvy

"Markus Scheible" wrote in message
...
Hi newsgroup,

I produced an array containing floaters between 0 and 1
calculated as a percentage, e.g. 0,8888788888.

If I try to use them as the Text of a Text Box, this Box
shows the floater but I need to show the percentage in the
format "88,88 %". Do you know how I can transform these
array entries to the format needed?

Thanks in advance and best regards,

Markus



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default How to transform float to percentages within an array?

you can transform most text by using the format method
fl = 0.888887888888
flstr = Str(fl)
finstr = Format(flstr, "##.00 %")
MsgBox finstr
"Markus Scheible" wrote:

Hi newsgroup,

I produced an array containing floaters between 0 and 1
calculated as a percentage, e.g. 0,8888788888.

If I try to use them as the Text of a Text Box, this Box
shows the floater but I need to show the percentage in the
format "88,88 %". Do you know how I can transform these
array entries to the format needed?

Thanks in advance and best regards,

Markus

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How to transform float to percentages within an array?

Hi Tom, hi Ben,

thanks a lot for the tip. Now it works perfectly...

Best

Markus



-----Original Message-----
Textbox1.Text = Replace(Format(varr(i,"#0.00 %"),".",",")


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
Have a text box 'float' over a sheet Tokyo Alex Excel Discussion (Misc queries) 2 February 3rd 10 05:53 PM
menu float bloke2 Excel Discussion (Misc queries) 1 July 22nd 08 05:00 PM
How do I float a clipart object Kermy Excel Discussion (Misc queries) 0 March 17th 08 03:47 PM
Need field at top to float down as I scroll down? Bill R Excel Worksheet Functions 3 August 3rd 06 01:43 PM
How do I float cells so others scroll under it? Keith Excel Discussion (Misc queries) 1 July 9th 05 10:09 PM


All times are GMT +1. The time now is 10:27 AM.

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

About Us

"It's about Microsoft Excel"