Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Dec 2009
    Posts
    212
    Thanks
    36
    Thanked 0 Times in 0 Posts

    keep rows in view

    What I need:
    Columns A to J; Freeze pane at row 2 so when I scroll down, rows 1 & 2 remain visible.
    OK, that is easy.
    But I also need to see "columns L to V; rows 1 to 27" [which scrolls off the screen after I scroll past row 27], leaving only rows 1 & 2 from the freeze pane.

    Can I split the sheet at column K to either have 2 different freeze panes, split at column K, or just have a vertical split to have 2 vertical scroll bars/areas, one for column A to J and one for columns to the right of column J, so "columns L to V; rows 1 to 27" remain fixed/visible as I scroll down columns A to J past row 27?

    Is this possible?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    You can set up a couple of windows each with a freeze pane. You can also shlow them side-by-side and sync them if desired

    Steve

  3. #3
    3 Star Lounger
    Join Date
    Dec 2009
    Posts
    212
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Steve,
    Thanks for reply. How would I synch them?

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    In xl2010
    View - New Window
    Then select "View Side by Side" and "Synchronous Scrolling"

    Steve

  5. #5
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Skipro,

    Here is a macro that I recorded then modified to setup the sheet the way you want. I also created a second macro to return to normal view. You can take the macros and add them to the "Quick Access Toolbar" so you can toggle back and forth between views. Note: you may have to adjust the Top, Left, and Height properties in the code for your resolution. I does not matter what the name of the file is, the code adjusts. Just remember that WorkbookName:1 is the main pane while WorkbookName:2 is the added pane. If you close one manually, you should close the added pane. If you close the main pane instead, the once added pane becomes the new main pane and the next time the code is run, the pane will open with the name WorkbookName:3 and the code will fail. If you open and close with the macros, this problem will always be avoided.

    ScreenView1.png

    ScreenView2.png

    Code:
    Sub DualScreenSetup()
    WbName = ThisWorkbook.Name
        'CREATE A NEW PANE AND FORMAT
        ActiveWindow.WindowState = xlNormal
        ActiveWindow.NewWindow
        With ActiveWindow
            .Top = 0
            .Left = 466.75
            .Width = 493.5
            .Height = 600
        End With
        ActiveWindow.SmallScroll ToRight:=11  'SET TO COLUMN L
        'FORMAT MAIN PANE
        Windows(WbName & ":1").Activate
        Range("A3").Select
        With ActiveWindow
            .Top = 0
            .Left = 0
            .Width = 466
            .Height = 600
            .SplitColumn = 0
            .SplitRow = 2
            .SplitColumn = 0
            .SplitRow = 0
        End With
        ActiveWindow.FreezePanes = True
    End Sub
    
    Sub SingleScreenSetup()
    WbName = ThisWorkbook.Name
         Windows(WbName & ":2").Activate
         ActiveWindow.Close
         ActiveWindow.WindowState = xlMaximized
         ActiveWindow.FreezePanes = False
    End Sub
    To add them to the Quick Access Toolbar (QAT),
    1. Click on the arrow to the right on the QAT and select More Commands...
    2. In the Customize the QAT window, select Macros from the "Choose Commands From:" drop down box.
    3. in the selection window, select the macro then click the Add button
    4. repeat for the second macro
    5. Click OK

    ScreenView3.png

    ScreenView4.png

    HTH,
    Maud
    Attached Files Attached Files
    Last edited by Maudibe; 2014-01-01 at 15:39.

  6. The Following 2 Users Say Thank You to Maudibe For This Useful Post:

    Lexi (2014-02-08),skipro (2014-01-13)

  7. #6
    3 Star Lounger
    Join Date
    Dec 2009
    Posts
    212
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Maud,
    How would I get this to split at column "U"?

  8. #7
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Change the following line to 20

    ActiveWindow.SmallScroll ToRight:=11

  9. #8
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    It is splitting after the nth column (20=T) so the U is the first column of the second pane

  10. The Following User Says Thank You to Maudibe For This Useful Post:

    skipro (2014-02-14)

  11. #9
    3 Star Lounger
    Join Date
    Dec 2009
    Posts
    212
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Maud,
    I had tried that before and no number change had any effect. Still split at "K". Got idea to rerun macro manually and that did it. Previously it was just loading the saved file.
    Duh..
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •