With Frozen panes move to specific column based on cell value

John_Whin

Board Regular
Joined
Feb 26, 2013
Messages
78
Platform
  1. Windows
In the below example the columns left of "L" are frozen. Beginning in L1 => CU1 have game number 1 - 82. In cell H1 is the next game number. I there a way based on the value in L1 to advance to the corresponding column?

So in this case the next game is #17 so I want first seen column right of K to be AC. (The column with 17 in cell AC1)

Thanks


tgetrdsS.jpg
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
How about
Code:
Sub NextGame()
ActiveWindow.ScrollColumn = Range("H1")
End Sub
 
Upvote 0
Slightly mis stated, I want the value in H1 to be the value that determines which column is right of "K". It would move the column with 17 (which is in cell C1) to determine which column would move to be just right of "K"

Fluff posted as I typed this
 
Last edited by a moderator:
Upvote 0
That returns column Q which is the 17th row beginning at A. I tried to add Range "H1"+12 but that does not work. Guess a work around might be to take the value in H1 and add 12 and put that value in another cell and use it as the base. Which does work, but it did change Calculations Options to Manual for whole workbook, so I changed it back to Automatic.
 
Last edited by a moderator:
Upvote 0
Try
Code:
ActiveWindow.ScrollColumn = Range("H1") + 12
 
Upvote 0

Forum statistics

Threads
1,224,742
Messages
6,180,685
Members
452,993
Latest member
FDARYABEE

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top