Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Alignment of Figures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Black - 17 Sep 2007 10:20 GMT
Hi everyone,

I have the following ...

.Offset(3, 0).Value = "For " & P & " numbers there are " & Format(tly,
"###,###,##0") & " x different values of " & cmb & " numbers. "

... which includes figures upto and including millions.
The thing is that the above code ONLY produces figures that are
relevent.
Is there a way that I can get it so the figures align under each other
please. What I mean by that is there will be potentially several
spaces before the figure output because it might only be 1, and the
next figiure might be 256,369.

Thanks in Advance.
All the Best.
Paul
Tom Ogilvy - 17 Sep 2007 11:30 GMT
..Offset(3, 0).Value = "For " & P & " numbers there are " & _
 Right(space(15) & Format(tly,"#,##0"),15)  & _
 " x different values of " & cmb & " numbers. "

Would be the direction I would go.  With proportionally spaced fonts, it
would be difficult to get exact.   If you use courier new, it would work.  

Perhaps something similar for "cmb"  and "P" possibly - you know what you
want better than I.    #,###,##0  is redundant.  #,##0  will do the same.

? format("1000000000","#,###,##0")
1,000,000,000
? format("1000000000","#,##0")
1,000,000,000

Signature

Regards,
Tom Ogilvy

> Hi everyone,
>
[quoted text clipped - 14 lines]
> All the Best.
> Paul
Paul Black - 17 Sep 2007 13:18 GMT
Thanks Tom,

> ..Offset(3, 0).Value = "For " & P & " numbers there are " & _
>   Right(space(15) & Format(tly,"#,##0"),15)  & _
>   " x different values of " & cmb & " numbers.

... does do exactly as I have requested, thank you.
I normally use "Tahoma", which as you quite rightly said, does not
align them correctly.

Thanks Again.
All the Best.
Paul

On Sep 17, 11:30 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
wrote:
> ..Offset(3, 0).Value = "For " & P & " numbers there are " & _
>   Right(space(15) & Format(tly,"#,##0"),15)  & _
[quoted text clipped - 35 lines]
>
> - Show quoted text -
Paul Black - 18 Sep 2007 08:42 GMT
Hi Tom,

One thing I do know is that if you use the Format 0;0;; it hides the
zeros in a Worksheet, but I don't think it is relevant in this
situation because the figures output are within a string.

Thanks in Advance.
All the Best.
Paul

> Thanks Tom,
>
[quoted text clipped - 54 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.