Select a worksheet

I'm using the below formula to determine the specific type of equipment from 
a list named: database


value of X2 = DSK and value of X5 = NBK

What I need help with is a way of using the value returned to automatically 
open the relevant worksheet, ie: If "Desktop" is returned the Desktop 
worksheet needs to open and if "Notebook" is returned the notebook worksheet 
needs to open automatically. All worksheets are in the same workbook.
6/5/2010 10:22:00 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 42

Assuming your vlookup formula as posted is in cell X1,
you could place this in say, Y1: 
to produce a clickable hyperlink to the particular sheet returned by your 
Any worth? hit the YES below
"Phil" wrote:
> I'm using the below formula to determine the specific type of equipment from 
> a list named: database
> =IF(VLOOKUP($J$2,Database!$A:$U,21,FALSE)=$X$2,"Desktop",IF(VLOOKUP($J$2,Database!$A:$U,21,FALSE)=$X$5,"Notebook","Error!!!!!!!"))
> value of X2 = DSK and value of X5 = NBK
> What I need help with is a way of using the value returned to automatically 
> open the relevant worksheet, ie: If "Desktop" is returned the Desktop 
> worksheet needs to open and if "Notebook" is returned the notebook worksheet 
> needs to open automatically. All worksheets are in the same workbook.
6/6/2010 2:24:30 AM
Private Sub Worksheet_Calculate()
    On Error GoTo stoppit
    Application.EnableEvents =3D False
    With Me.Range("A1")
        If .Value =3D "Desktop" Then
        ElseIf .Value =3D "Notebook" Then
        End If
    End With
    Application.EnableEvents =3D True
End Sub

Right-click on the sheet tab and "View Code".  Copy/paste the code into =
sheet module.

Edit the "A1" to suit.

Alt + q to return to Excel.

Gord Dibben  MS Excel MVP

On Sat, 5 Jun 2010 15:22:00 -0700, Phil <>

>I'm using the below formula to determine the specific type of equipment =
>a list named: database
>value of X2 =3D DSK and value of X5 =3D NBK
>What I need help with is a way of using the value returned to =
>open the relevant worksheet, ie: If "Desktop" is returned the Desktop=20
>worksheet needs to open and if "Notebook" is returned the notebook =
>needs to open automatically. All worksheets are in the same workbook.

6/6/2010 3:30:06 PM

Similar Artilces:

Run report on multi selected records.
I try to make a report for a custom entity that works like the Account Summary: let's say that it's Customer's Inquiry Summary for entity Customer's Inquiry I made the report so that I'm able to run the report on Customer's Inquiry Form. But when I select multi records in the list of Customer's Inquiry and run report, only one record is show in one page of the the report. I would like to have the selected records appear in the report with each record on each page. How can I do this? ...

Combo box list selection based on earlier selection by user
HI, I have a form that has a combo box 1 (Product) that reads a the Product table and has a unique id attached to each product (RO#). There is a second combo box 2 that is RO#. Now what I would like to do is when a user selects a Product in combo box 1, the system should lookup the Product selected from combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I am using both combo boxes as Unbound and in the combo box 2 I have the two columns Product and RO# - in the Criteria row of RO# I have the following: Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![x...

Can't select objects in Excel 2007
I'm trying to create a form in Excel 2007, and although I can manipulate, copy & paste controls (check boxes, etc) I can't select multiple objects to align them, etc. I've checked on-line help (and have followed the instructions), and other websites, but no one seems to have indicated a problem. It is extremely cumbersome and I need a solution. Any ideas? Thanks in advance, Jim Berglund I know this is about a year too late, but it may help others who have stumbled across this page looking for similar help. On the Home tab, in the Editing group, click Find & Select....

Lot Selection not Showing when I select PO on Receiving Entry
Usually, the Lot selection screen would pop up when I select a PO at the Line Detail of the Receivings Entry, now it does not! And GP will let items post without a lot number! It seems as if a setting has changed. Any ideas anyone? Any help is appreciated. Thanks, R Are you sure the item is marked to track lots? This wiould be set item by item on the Item Maintenance Options window. -- Richard L. Whaley Author / Consultant / MVP 2006-2008 Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at &q...

merging worksheets
Hello, I have 6 workbooks all with a single worksheet. I want to bring them together into a single workbook with 6 worksheets. I can do it via copy & paste, but is there a simpler way please ? I have excel 2007 Thanks K You might want to take a look at Ron's article here: But for only 6 sheets, it might just be easier to copy each worksheet. You're choice. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "KRK" wrote: > Hello, > > I have 6 workbooks all wi...

Select contact then hangs
Hi, please help. I have a user that when she selects a contact using To: in a new email, after selecting 2, it closes outlook??. Spec is W2kSP4\office2k with all windows updates and office updates installed. Profile has been deleted and re-created, plus i have set up personal folders and moved contacts into there, and set that folder as a default, but makes no difference. Please help. ...

How to find link in worksheet?
I'm using Excel 2002. For some reason, when I open a particular worksheet that I work with often, I get the following popup: The worksheet contains links to other data sources UPDATE DON'T UPDATE HELP This just started after cutting and copying a group of cells into another worksheet. Any suggestions how I find out what this is and correct it? Thanks, Brett Since Excel encloses the workbook name in square brackets [...] try searching for [ or ]. Otherwise use Edit/Links, and change the link to point to the current file itself. On Tue, 4 Nov 2003 20:01...

Selecting rows from various sheets
Hi all, I have several sheets with a few columns in each. One colum in each sheet has a unique value. Most of these unique values are th same in each sheet but not all. Is there any way that I can set up new sheet that will have the unique value in column 1 and th corresponding column values frommeach sheet beside it. For example Sheet 1 aa 1 1 1 bb 2 2 2 cc 3 3 3 Sheet 2 aa 4 4 cc 5 5 Result aa 1 1 1 4 4 bb 2 2 2 cc 3 3 3 5 5 Thanks alot, Sha -- sha ----------------------------------------------------------------------- shav's Profile: http...

select text in Calendar
I'm working on a calendar in Publisher. I'm adding text into a cell by spacing down 1 point, then typing in 8 points. Doing fine until April. At that time, I can only select cells (whole days). It will not let me select the text. Help is no help. Any hints out there. Did I accidentally select something to do this? Bonnie Have you added a picture to the cell or a shape? If you have send it to the back, make the cell no fill and try again. -- Mary Sauer MSFT MVP news:// "GoBonnieGo" <GoB...

macro to filter data based on selected data
Hi, I am looking for a macro that requests input of a reference code and then a date and then filters the data in my spreadsheet based on this criteria. I am using excel 2007. Any help with this will be greatly appreciated. You can probably record a macro while doing it manually and then clean it up and add input boxes to ask the question or input your variable in a cell and use that. If all else fails, If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the ...

Creating a worksheet from others (IF statement)
Hi Guys, I tried looking fort his answer and I think it is answered in parts of other questions but I cant get it together. Scenario: I have a file called invoices.xls which is a workbook of 12 monthly worksheets for the year. Each item in a monthly worksheet is a row that houses project information financials etc (project cost, outsourced cost, project name etc) We also have another file (wip.xls) where we double handle all of that information and cut and paste only those files that we are currently working on. I would like wip.xls to be automatically populated with certain cells f...

Link select with a blast
I have Win 7 Home Premium, x64. Quite often, when I select a link, a mouse pointer changes to a palm with a blast. I understand, the palm is the standard mouse pointer for link select, but what is the blast? What it indicates? -- Ilya Zeldes Fort Myers, Florida Hi Ilya, I suspect that this is being caused by a tracking program. Run something like Ad-Aware and see if it indicates a tracking company. If so, you can delete it, however, it might prevent you from accessing that particular website. Dave "Ilya Zeldes" wrote in message news:7A6FF9B1-5512-44...

Select Case in a Change Event
Hi, I am trying to use a worksheet Change Event to trap changes to specific columns. depending on which column is chnaged by the user, the value in another ciolumn will be altered; so, changes in either column O or P will update column Q, changes in either column T or U will update column V and changes in column Z or AA will update column AB. What I can't figure out is the Select Case bit (where I've got the shouted question below). Here's what I've put together, any comments would be much appreciated. Private Sub Worksheet_Change(ByVal Target As Range) ...

VLOOKUP: Referencing worksheets whose names contain commas
Hello, How do I make a VLOOKUP formula reference a different worksheet that has a comma in its name? For instance, in Sheet1 I want to refer to a sheet named "Last, First" in this way: =VLOOKUP(A1, 'Last, First'!$A$1:$M$100, 13, TRUE) But the comma in sheet "Last, First" seems to make the VLOOKUP function advance the argument too early. Is there an easy fix for this? Thanks, --David Aukerman Update: It seems that the function as I wrote it *evaluates* correctly, but while I'm typing it in, the tooltip (that helps me determine which ar...

Select Records based another table...
This may be very elementary, but i can't wrap my brain around it. I have tried to dummy it down as much as i can for myself, with plans of adapting it into something working. I have three tables that look like the following: Tbl 1: ProdID A B C 1 $1 $2 $3 2 $4 $5 $6 3 $7 $8 $9 Tbl 2: RmNum ProdID 1 3 1 2 2 1 2 2 Tbl 3: RmNum Style 1 A 2 C Relationships are: [tbl1 ProdID] ------ [tbl2 ProdID] [tbl2 RmNum] ...

Multi-Select List Box Does Not Retain Selected Items
I created an Outlook Form in 2003. But when I select items in the list box they do not remain select when I select another control on the form. Any suggestions? Did you bind the list box to a keywords field? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers "kaykay" <> wrote in message news:276dd01c4638d$bd5af590$a501280a@phx.gbl... > I created an Outlook Form in 2003. But when I select > items i...

I am very new to VBA and access and have a question regarding a SELECT statement. I am going to run a select (recordset - so I can loop through and process each record) but on my SELECT I want to make sure I return at least 20 rows, otherwise I am going to change my WHERE clause to include more rows. Is there an easy way to do this or do I need to just do an inital SELECT COUNT(*) and then decide which WHERE clause to use?? Do you have an example I can look at? Thank you in advance! AJ On Fri, 14 Dec 2007 17:14:00 -0800, AJ <> wrote: I would not first ...

Dealing with Named Ranges when Importing Worksheet from Another File
When you are using range and name functions a lot, what's the best way of importing a worksheet from another file? It goes through a whole loop where asking whether to use the name defined in the destination sheet. I just press the enter down until but there must be a better way. ...

chart in a 2007 worksheet changes positon
I have upgraded froom 2003 to 2007. The embedded charts on a worksheet do not stay anchored. I save and close a workbok. I reopen the workbook and the chart has changed positon, usually to a position over the data. How do I anchor the chart in a given position on the woorksheet? Thank you. ...

Drop down list quicker selection
We are using Excel 2003 We created a drop down list using the Data\Validation process, which works fine. When the arrow within a cell is clicked on to show the drop down list, how can you quickly select one of the many names in the list just by typing the first character of a name within the list. At the moment, we have to scroll up and down the list to select a particular name, which in itself isn't a problem, but slows down the process of finding the right name. Can the names within the list be alphabetically grouped when inputting the first character from the keyboard, and spee...

shared html worksheet unavailable
When trying to open a shared html worksheet, I get the following error message: "TOC.htm is locked for editing by 'another user'. Click 'Notify' to open a read-only copy of the document and receive notification when the document is no longer in use." I've tried this on multiple computers, and it has been happening for at least a week. This file is updated periodically, and because of this message we can't update it. I get the same error message on the computer the file was originally created on as well. Help and suggestions are appreciated. Thanks...

Selected fields to update
I need to have the ability, in OL'07, when I try to copy in a contact and am told there is a duplicate, to be able to select which fields I want updated and which not. Is that possible built-in or add-in? -- Boris You may find this of interest - ContactGenie DataPorter 2.0 - specifically handles updating of pre-existing contacts allowing you to define which fields you want to import/update from your input data file (custom forms/fields supported). Features: Download" Karl _...

Change Form/Report Query Based on User Selection
I have a form and report based on a query. I need to change the query based on what the user selects on a form. Using VBA in MS Access 2002, can I change a single field in an existing query from GROUP BY to LAST? This process would be initiated by a click event on a form. Thanks in advance for any help. I would say only if you are willing to construct the entire query string in VBA and then apply that string as the source of the report. John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County Wayne wrote: > I have a form ...

How do I find the currently selected Scenario?
Hi, Maybe this is a simple thing, but I don't seem to be able to track it down. I have an Excel sheet with a couple of Scenarios defined. I am trying to implement some VBA functions where I need to know which Scenario is currently selected. Does anyone know how I determine the active Scenario from VBA? Any help will be greatly appreciated. Thanks in advance. Best regards. hi, (?) > Maybe this is a simple thing, but I don't seem to be able to track it down. > I have an Excel sheet with a couple of Scenarios defined. > I am trying to implement some VBA functi...

Copying File Properties of Excel Worksheet
Hello I want to know if it is possible to enter all the file properties, Title, Subject Author, Manager, Company Category, key words from the File>>Properties>>Summary menu and copy these into other Worksheets automatically. can this be done with a MACRO or script? Trying to find a way to get lazy people to fill in these blanks Serno001 Worksheets don't have Properties. Workbooks have Properties. Why would you want to copy the same properties data to each workbook? Wouldn't a lot of those custom properties be unique to its own workbook? Like Author, keywords etc....