Skip to main content
deleted 59 characters in body
Source Link

My goalexpected result is to have a dropvery simple -down list with I have used data validation to place a "JUMP" button. The words in this drop-down list will be a collection of about 85 column titles in a cell. Since there are so many columns When a user selects a column title and clicks the button, I want the userthem to selectbe taken to the columnCOLUMN where that word is the title.

For example, thenuser selects "Game 5", which is in column 34. They click the button"JUMP" and automatically jumpare taken to that exact columnColumn 34 Row 1.

I've done this before with jumping to rowsLikewise, but am having issues figuring it out for columns - I could not find anything like thisuser selects "Game 52", which is in column 76. User clicks "JUMP" button and is taken to Column 76 Row 1.

Here's what I have so far:

MATCH function set up in Cell AP1, searching for the dropdown value location within the top row. This basically returns the Column # that I want the jump button to move to.

Then, I have my script:

function jump2() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var s = ss.getSheetByName("ClassicGames"); // change to sheet containing dates
      var r = s.getRange("AP1").getValue(); //change A1 to cell containing =match formula
      s.setActiveSelection(s.getRange(r)); 
}

I thought maybe this combination would just take me to whatever number the MATCH function finds. For instance, if r = 35, the user will move to the 35th column.

I thought maybe s.column would work, but it appears I am just making up functions at this point.

Any ideas?

My goal is to have a drop-down list with a "JUMP" button. The words in this drop-down list will be a collection of about 85 column titles. Since there are so many columns, I want the user to select the column title, then click the button and automatically jump to that exact column.

I've done this before with jumping to rows, but am having issues figuring it out for columns - I could not find anything like this.

Here's what I have so far:

MATCH function set up in Cell AP1, searching for the dropdown value location within the top row. This basically returns the Column # that I want the jump button to move to.

Then, I have my script:

function jump2() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var s = ss.getSheetByName("ClassicGames"); // change to sheet containing dates
      var r = s.getRange("AP1").getValue(); //change A1 to cell containing =match formula
      s.setActiveSelection(s.getRange(r)); 
}

I thought maybe this combination would just take me to whatever number the MATCH function finds. For instance, if r = 35, the user will move to the 35th column.

I thought maybe s.column would work, but it appears I am just making up functions at this point.

Any ideas?

My expected result is very simple - I have used data validation to place a list of column titles in a cell. When a user selects a column title and clicks the button, I want them to be taken to the COLUMN where that word is the title.

For example, user selects "Game 5", which is in column 34. They click "JUMP" and are taken to Column 34 Row 1.

Likewise, user selects "Game 52", which is in column 76. User clicks "JUMP" button and is taken to Column 76 Row 1.

Here's what I have so far:

MATCH function set up in Cell AP1, searching for the dropdown value location within the top row. This basically returns the Column # that I want the jump button to move to.

Then, I have my script:

function jump2() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var s = ss.getSheetByName("ClassicGames"); // change to sheet containing dates
      var r = s.getRange("AP1").getValue(); //change A1 to cell containing =match formula
      s.setActiveSelection(s.getRange(r)); 
}

I thought maybe this combination would just take me to whatever number the MATCH function finds. For instance, if r = 35, the user will move to the 35th column.

Source Link

How to Jump to Column Based off of Cell Value

My goal is to have a drop-down list with a "JUMP" button. The words in this drop-down list will be a collection of about 85 column titles. Since there are so many columns, I want the user to select the column title, then click the button and automatically jump to that exact column.

I've done this before with jumping to rows, but am having issues figuring it out for columns - I could not find anything like this.

Here's what I have so far:

MATCH function set up in Cell AP1, searching for the dropdown value location within the top row. This basically returns the Column # that I want the jump button to move to.

Then, I have my script:

function jump2() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var s = ss.getSheetByName("ClassicGames"); // change to sheet containing dates
      var r = s.getRange("AP1").getValue(); //change A1 to cell containing =match formula
      s.setActiveSelection(s.getRange(r)); 
}

I thought maybe this combination would just take me to whatever number the MATCH function finds. For instance, if r = 35, the user will move to the 35th column.

I thought maybe s.column would work, but it appears I am just making up functions at this point.

Any ideas?