+ Reply to Thread
Results 1 to 8 of 8

How to display a worksheet if a criteria is met

  1. #1
    Registered User
    Join Date
    03-29-2013
    Location
    Rabat, Morocco
    MS-Off Ver
    Excel 2007
    Posts
    4

    How to display a worksheet if a criteria is met

    Hi,

    I'm having an excel file containing multiple worksheets named according to countries.
    I would like to create a more elegant solution whereby a user would have only 1 worksheet where he would specify the country he is interested in (from drop-down menu) and depending on the country selected, the right worksheet would be displayed (otherwise, I would keep them hidden).
    Is there a way to do this displaying of the right worksheet using a formula (I am not familiar with VBA).

    Thanks,

    Elvir

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: How to display a worksheet if a criteria is met

    If every sheet has the same layout you can create a master sheet and make the cells show the relevant country data. Copy a sheet then change all the cells which will change according to country to the below (this one is cell E1)

    =INDIRECT(A1&"!E1")

    A1 on the master sheet for the above example is the name of the country as it appears on the tab name. A1 can be a drop down list for each country to limit the selction. You can then hide the countries to leave one front end sheet.

    Hope this helps

    EDIT
    Country.xlsx
    Attached basic example of what i mean (tabs not hidden though)
    Last edited by Harribone; 03-29-2013 at 08:00 AM.
    Say thanks, click *

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to display a worksheet if a criteria is met

    How about attaching a sample file so we can help you with it?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to display a worksheet if a criteria is met

    Hi ES79

    As arlu1201 points out, attaching a sample sheet. But I think for what you require, it might be best posting in the vba forum.

    http://www.excelforum.com/excel-programming-vba-macros/
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to display a worksheet if a criteria is met

    Kevin,

    If the OP wants a macro solution, we can have the thread moved. But i wouldnt suggest that he create a new thread in the programming sub forum as it will result in duplicate threads.

  6. #6
    Registered User
    Join Date
    03-29-2013
    Location
    Rabat, Morocco
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to display a worksheet if a criteria is met

    Thanks Harribone - it seems quite a good approach, given the same layout and restriction not to use VBA. Like the provided example

  7. #7
    Registered User
    Join Date
    03-29-2013
    Location
    Rabat, Morocco
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to display a worksheet if a criteria is met

    The idea was not to use VBA, hence in this forum. Harribone provided an acceptable input. Appreciated guys!
    Quote Originally Posted by arlu1201 View Post
    Kevin,

    If the OP wants a macro solution, we can have the thread moved. But i wouldnt suggest that he create a new thread in the programming sub forum as it will result in duplicate threads.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to display a worksheet if a criteria is met

    Ok great, you got your question solved.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1