+ Reply to Thread
Results 1 to 6 of 6

Replicating data from master sheet based on 2 criteria

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Replicating data from master sheet based on 2 criteria

    Thank you for reading my post, I could really use expert help on this!

    I have a master spreadsheet created to track expenses (attached). Each line of the spreadsheet refers to an expense, and each expense is assigned a "Division" (ex. A, B, C, D, E) and Region (North America, Latin America, Europe, ME&A, or AsiaPac). I need to build functionality into the spreadsheet whereby various users can open the spreadsheet and have read-only access to just the expenses they have incurred for their Division and Region. In other words, I want Mr. Smith to be able to see only expenses for Division B North America and nothing more. This creates of combination of 25 divisions and regions, with 25 users who need to be able to access read-only data on their division and region.

    Can someone give me an idea as to the best way to accomplish this? I have considered Pivot tables, IF statements to force an expense line item to a certain tab then password protecting each tab, etc.

    I know there has to be a better way to do this, but I am at a loss for what to do and am running into a project deadline on this.

    If you're able to propose a solution, can you please provide guidance on how I can accomplish what you suggest?

    Your help is MUCH appreciated!
    Attached Files Attached Files

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

    Re: Replicating data from master sheet based on 2 criteria

    How do you identify that it is Smith who has opened the file? If we are able to validate the credentials of the person opening it, then based on the credentials, the data for that person can be copied into a separate sheet and all the other sheets can be hidden.

  3. #3
    Registered User
    Join Date
    10-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Replicating data from master sheet based on 2 criteria

    Quote Originally Posted by arlu1201 View Post
    How do you identify that it is Smith who has opened the file? If we are able to validate the credentials of the person opening it, then based on the credentials, the data for that person can be copied into a separate sheet and all the other sheets can be hidden.

    Those accessing the database would presumably be identified by their company-issued userid (Jsmith) which is their email address and allows access to company networks - does this make sense and can we work with that?

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

    Re: Replicating data from master sheet based on 2 criteria

    Oh this is a lil more complex than i can handle. I will try and get experts to help out. Here, we need to compare the userid of the person to the excel file.
    I have passed this onto other members of the forum.
    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]

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: Replicating data from master sheet based on 2 criteria

    It's easy enough to get the User ID / credentials but, in my experience, there can be some issues. JSmith is a good example ... John, James, Jack, Jenny ... are all common names beginning with J and Smith is a common surname. Hence JSmith is unlikely to be a unique User ID and, consequently, User Admin people tend to introduce numbers and middle initials or the second letter of the first name or whatever to make it unique.

    If and when you can get the User ID, how do you then determine what they should have access to?

    It sounds as though you'd need a table of names, passwords and area(s) and a means to maintain it.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Replicating data from master sheet based on 2 criteria

    Make a sheet for every user; sheetname=username

    Use advancedfilter to copy the users rows to his/her own sheet.
    The criteria range begins in sheets("overall").Range("AA1")

    Hide all other sheets.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by snb; 11-22-2011 at 07:14 AM.



+ 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