Dynamic frozen row

BobbyConkers

New Member
Joined
Mar 26, 2014
Messages
33
Good morning all.

I am looking for a solution whereby a different top row is displayed depending on where the user is scrolled down to in a tab. This is for display purposes only.

I have columns A-S populated not with data, but with graph and narrative tiles.

The header (just cells A1:S1, merged, sorry, not my fault!) for the first section is "Harm Free Care". Obviously I could freeze this pane at A2. However, once one scrolls down to row 241, the relevant header would become "Patient Experience" (cells A240:S240). Once down to row 377, the top visible row would become "Patient Outcomes" (cells A376:S376).

Is there way of changing the visible top row (or header?) depending on where one is scrolled to in the sheet please? VBA would be fine.

Many thanks in advance,

Andy
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

FatBoyClam

Board Regular
Joined
Jan 8, 2020
Messages
183
Office Version
  1. 365
Platform
  1. Windows
The first problem you have is that detecting scrolling actions is very difficult - there's no built in event for scrolling.

There's an excellent article on Chris Pearson's excel site here

The next problem would be this could work with the ActiveWindow.SplitRow property, but the user would not be able to scroll back up, as the pane would be frozen.

What I'd suggest (assuming you can overcome the problem of detecting scrolling) you'd consider, is leaving the pane frozen at line one, but programmatically changing the value of the cell to change the 'Header' displayed, depending on where the user is viewing.
 

Watch MrExcel Video

Forum statistics

Threads
1,119,236
Messages
5,576,896
Members
412,752
Latest member
LUIS SAMANO
Top