Results 1 to 2 of 2

Thread: [RESOLVED] Scroll to first empty cell in a column when window is split

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Oct 2008
    Location
    Midwest Region, United States
    Posts
    3,574

    Resolved [RESOLVED] Scroll to first empty cell in a column when window is split

    I have a number of rows in a spreadsheet. Some have a value in column C, some do not. What I'm trying to do is have the first row with no value in column C scroll to the position directly underneath the header row (the row above the split). See attached for the before and after sheets.

    Thanks!
    Attached Files Attached Files

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Oct 2008
    Location
    Midwest Region, United States
    Posts
    3,574

    Re: Scroll to first empty cell in a column when window is split

    Think I got it:

    Code:
    Sub scrollToBlank()
        Dim cnt As Integer
        
        cnt = ActiveWindow.Panes.Count
        ActiveWindow.Panes(cnt).ScrollRow = 4   'change this number as needed
    End Sub
    Edit: Had to add this in to make sure the headers (row 1) were displayed above the split:

    Code:
    ActiveWindow.Panes(1).ScrollRow = 1
    Last edited by vbfbryce; Jun 21st, 2018 at 08:20 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width