Short cuts

Larry13

New Member
Joined
Sep 18, 2011
Messages
1
Hi
I would like to know if there is a way to create a shortcut from a cell to another sheet in the same workbook please.

What I am doing is setting up a budget with each ecxpense listed on the first page and I have a separate sheet for the collation of each expense, there are approxiamatley 60 expense items & I am looking for a quick way to go to any sheet rather than scrolling to them from the front sheet.

Thank You
Larry
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You could do hyperlinks. For instance, lets say I'm on sheet2 and want to quickly go to sheet1 without clicking the sheet1 tab. This is accomplished by clicking a hyperlinked cell in sheet2.

Enter your category name in a cell on sheet2. then hit Ctrl+K. Select Place-in-this-document. Then select sheet1 or whatever sheet you want linked to. You can also choose the active cell that sheet1 will first appear by choosing the Type-Cell-Reference to whatever you want.
 
Upvote 0
If your sheets are named in such a way that they can be parsed by typing the beginning text of the sheet you want to go to (I'm describing a type-ahead feature here), then perhaps this UserForm solution I posted several years ago to an old newsgroup message might work for you.

Here is it, presented as I originally posted it (basically, it shows a ListBox of all sheets which you can click directly in (and get taken to the clicked on tab name) or start to type the beginning text of a tab name into a text box which will parse down the list of tab names so you can either click or arrow down to make a selection). My previous post follows....

Okay, here is something I think will meet your needs (don't be put off by the its length, it is really worth the effort)... its a UserForm which lets you type partial entries, pick from a list and takes you to the indicated sheet. I'm going to assume you do not know how to implement a UserForm and talk you through the whole process.

Go to the Visual Basic editor (press Alt+F11 from any worksheet). Once there, click Insert/UserForm form the menu bar. You will see a blank form and a window with the caption Toolbox. The Toolbox has controls (TextBox, ListBox, etc.) on it that you will be placing on the blank UserForm (note.. the Toolbox is displayed only when the UserForm has focus). Before we put any controls on the UserForm, let's rename it. On the left side of the VB editor should be a window with the caption "Properties - UserForm1" (if you don't see this, press F4). The first field of the Properties window is labeled (Name) and next to it is the word UserForm1... click the word UserForm1 and type GoToSheetSelector in its place. Next, look down and find the Height and Width properties and set them to these values...

Height = 230
Width = 165

These, and other properties for the controls we will be putting on the UserForm, are initial settings to get you started... you will be able to modify them later to suit your own tastes. The rest of the default values for the UserForm should be fine for now.

Okay, let's set the UserForm up. There will only be two controls on the UserForm... a TextBox and a ListBox.

First, the TextBox. Give the UserForm focus (to make the Toolbox visible) and click on the TextBox icon in the Toolbox (it is one with the lower case letters "ab followed by a vertical bar) to place it. You can use the resize handles to make the TextBox whatever size you want and you can click/drag it to any position you want, but we will use the Properties window to set them to exact values. There are only seven properties I want you to set initially. In the Properties window, find and set the following values...

Height = 18
Left = 10
MultiLine = True
Top = 10
Width = 140
WordWrap = False

The seventh property is actually a dialog box for an object where you will set 3 properties of the object. Click on the field to the right of the Font property and you will see a little button with 3 dots in it... click that button. On the dialog box that appears, set these properties....

Font = Arial
Font Style = Bold
Size = 10

Okay, that takes care of the TextBox. Next, let's add the ListBox. Click the ListBox icon in the Toolbox (it is a rectangle with 3 horizontal lines on the left and what are supposed to be up/down arrows on the right... if you hover the mouse over the controls, a tooltip will appear with the control's name... you are looking for ListBox) and then click/drag on the UserForm to place it. Set the following properties for it in the Properties window...

Height = 165
Left = 10
Top = 38
Width = 140

Okay, that should take care of setting up the UserForm; now let's install the code. Press F7 to bring up the code window for the UserForm (or simply double click anywhere on the UserForm or one of its controls). Delete anything you see in the code window that appears and copy/paste **all** of the marked off code that follows my signature into this code window.

Okay, that takes care of the UserForm itself, now we just need a way to call it up. Still in the VB editor, click Insert/Module from the menu bar. Another code window will appear; copy/paste this into it...

Code:
Sub CallGoToSheetSelector()
  GoToSheetSelector.Show
End Sub
Okay, that is pretty much it... the UserForm is usable right now. From any sheet in your workbook, press Alt+F8, select CallGoToSheetSelector from the list and click Run (we can do this differently and I'll explain how in a moment). The UserForm will be displayed showing all sheets in your workbook in the ListBox and the cursor will be in the TextBox. Here is how the UserForm works. Start to type in the name of a sheet in your workbook and the ListBox will show only sheet names starting with that text. You can continue to type until only one name is left in the ListBox (you might not have to type the full sheet name to completion for this to happen) and then press the Return key to go to that sheet. But you don't have to keep typing until there is only one sheet name left in the ListBox... at any time, you can press either the down or right arrow and you will find yourself in the ListBox itself where you can continue to use the arrow keys to place the highlight on the sheet name you want, then press Return to go to that sheet. If you find yourself in the TextBox by mistake, just press the left arrow key to put yourself back into the TextBox. You can edit the text in the TextBox and the ListBox will display the sheet names corresponding to the type in text. If you type text that is not the starting text of a sheet name, the ListBox will not display anything (if you mistype a letter so this occurs, just delete the mistyped letter and the ListBox will adjust accordingly). Oh, and you can also just click an entry in the ListBox with your mouse and that will take you to the clicked on sheet name.

Okay, now about alternate methods of activating the UserForm (besides always using Alt+F8/Select/Run). Go to any worksheet and press Alt+F8, select CallGoToSheetSelector from the list and then click the Options button. This will bring up a dialog box which lets you assign a shortcut key to your macro. Type a lower case "g" in the indicated field, then click OK and close the dialog box. Now, from any sheet in your workbook, press Ctrl+g and your UserForm will appear, ready to use.

I think that is everything. If you have any questions, feel free to post back.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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