PC Review


Reply
Thread Tools Rate Thread

Center displayed columns in middle of window

 
 
dgold82
Guest
Posts: n/a
 
      5th Jun 2009
I have a worksheet that only contains 5 columns. The rest are hidden. Is
there a way to center the displayed columns in the middle of my screen when
excel is maximized. Think about if you go to weather.com--my 17 inch laptop
screen can probably display almost 2 explorer screens side by side but if you
maximize the screen the webpage is centered.

I would like to do this in my excel worksheet page when maximized.
Basically, center the 5 columns that I need so that they aren't anchored to
the left when I work in full screen mode or when maximized. Don't know if
this is possible, but I figured it couldn't hurt to ask.

Thanks.
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      5th Jun 2009
I am sure this is not what you are looking for; but still this may help..

If you dont want to zoom the spreadsheet then the other option would be to
select a cell in Row 1 towards the middle of the screen (say G1 or H1) and
Window>Split> to bring the columns to the middle of the screen....

If this post helps click Yes
---------------
Jacob Skaria


"dgold82" wrote:

> I have a worksheet that only contains 5 columns. The rest are hidden. Is
> there a way to center the displayed columns in the middle of my screen when
> excel is maximized. Think about if you go to weather.com--my 17 inch laptop
> screen can probably display almost 2 explorer screens side by side but if you
> maximize the screen the webpage is centered.
>
> I would like to do this in my excel worksheet page when maximized.
> Basically, center the 5 columns that I need so that they aren't anchored to
> the left when I work in full screen mode or when maximized. Don't know if
> this is possible, but I figured it couldn't hurt to ask.
>
> Thanks.

 
Reply With Quote
 
Trevor Williams
Guest
Posts: n/a
 
      5th Jun 2009
Hi dgold82 --
Try this. It could probably be 'streamlined' but will do the job you're
looking for.
HTH

Trevor Williams

-------------------

Sub CentreScreen()
Dim ImageSizeRow As Single
Dim ImageSizeCol As Single
x = Array(1, 7)
ImageSizeCol = Range("B:F").Columns.Width
ColWidths = (ActiveWindow.UsableWidth - ImageSizeCol) / 2
On Error GoTo CleanUp
With Range("A1", "G1")
Factor = .Columns(1).Width / .Columns(1).ColumnWidth
For i = 0 To 1
.Columns(x(i)).ColumnWidth = ColWidths / Factor
Next
End With
CleanUp:
End Sub

"dgold82" wrote:

> I have a worksheet that only contains 5 columns. The rest are hidden. Is
> there a way to center the displayed columns in the middle of my screen when
> excel is maximized. Think about if you go to weather.com--my 17 inch laptop
> screen can probably display almost 2 explorer screens side by side but if you
> maximize the screen the webpage is centered.
>
> I would like to do this in my excel worksheet page when maximized.
> Basically, center the 5 columns that I need so that they aren't anchored to
> the left when I work in full screen mode or when maximized. Don't know if
> this is possible, but I figured it couldn't hurt to ask.
>
> Thanks.

 
Reply With Quote
 
dgold82
Guest
Posts: n/a
 
      5th Jun 2009
Thanks, Trevor. This is where I am going! My range is actually rows A:K with
varying widths in each column.

Your code expanded the A column and actually pushed some of the colums out
of the window. Is there a way to center the columns in my window without
actually changing their widths. Only A through K will be visible the rest
will be hidden.

Thanks!

"Trevor Williams" wrote:

> Hi dgold82 --
> Try this. It could probably be 'streamlined' but will do the job you're
> looking for.
> HTH
>
> Trevor Williams
>
> -------------------
>
> Sub CentreScreen()
> Dim ImageSizeRow As Single
> Dim ImageSizeCol As Single
> x = Array(1, 7)
> ImageSizeCol = Range("B:F").Columns.Width
> ColWidths = (ActiveWindow.UsableWidth - ImageSizeCol) / 2
> On Error GoTo CleanUp
> With Range("A1", "G1")
> Factor = .Columns(1).Width / .Columns(1).ColumnWidth
> For i = 0 To 1
> .Columns(x(i)).ColumnWidth = ColWidths / Factor
> Next
> End With
> CleanUp:
> End Sub
>
> "dgold82" wrote:
>
> > I have a worksheet that only contains 5 columns. The rest are hidden. Is
> > there a way to center the displayed columns in the middle of my screen when
> > excel is maximized. Think about if you go to weather.com--my 17 inch laptop
> > screen can probably display almost 2 explorer screens side by side but if you
> > maximize the screen the webpage is centered.
> >
> > I would like to do this in my excel worksheet page when maximized.
> > Basically, center the 5 columns that I need so that they aren't anchored to
> > the left when I work in full screen mode or when maximized. Don't know if
> > this is possible, but I figured it couldn't hurt to ask.
> >
> > Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Center spreadsheet in middle of window dgold82 Microsoft Excel Programming 1 18th Aug 2009 08:24 PM
How to center a figure in the middle of an outlined paragraph? Lot Microsoft Word Document Management 12 26th Jun 2009 03:56 PM
Align Controls by Center or Middle Matthew Pfluger Microsoft Access Forms 0 12th Dec 2008 02:38 PM
Center Access2007 Form in the middle of access Main Window a Microsoft Access Form Coding 2 13th Dec 2007 07:51 AM
How do I center two columns of type along a middle line in Word? =?Utf-8?B?QmlnIEQgTGl0dGxlIFQ=?= Microsoft Word New Users 1 7th Feb 2005 06:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:11 PM.