• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Excel filtering

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Excel filtering

    I've got a large excel spread sheet that I need to filter.

    The spread sheet is a matrix - application functions listed by row and user id's by column with an X in the cells where there is an intersection.

    What I want to be able to do is select the function and filter for all the columns that have an X in them in that row. that is Select a function and see a record of all the users with access to it.

    Normally you can do it with the auto filter, but that works the other way around ( Select the column with the user name and filter for all the functions they have ). I can't transpose the sheet because there are more than 256 rows of data.

    Does anyone know a way you can do this?
    "Being nice costs nothing and sometimes gets you extra bacon" - Pondlife.

    #2
    Originally posted by DaveB View Post
    I've got a large excel spread sheet that I need to filter.
    Does anyone know a way you can do this?
    I'm lazy, I'd knock up something in VBA. Pivot tables perhaps?
    Cooking doesn't get tougher than this.

    Comment


      #3
      Originally posted by TheBigYinJames View Post
      I'm lazy, I'd knock up something in VBA. Pivot tables perhaps?
      WHS

      It could be done using formula but probably quicker to bash out some VBA
      Coffee's for closers

      Comment


        #4
        Originally posted by DaveB View Post
        I've got a large excel spread sheet that I need to filter.

        The spread sheet is a matrix - application functions listed by row and user id's by column with an X in the cells where there is an intersection.

        What I want to be able to do is select the function and filter for all the columns that have an X in them in that row. that is Select a function and see a record of all the users with access to it.

        Normally you can do it with the auto filter, but that works the other way around ( Select the column with the user name and filter for all the functions they have ). I can't transpose the sheet because there are more than 256 rows of data.

        Does anyone know a way you can do this?
        This is why databases were invented to hold relationships in data and spreadsheets were invented to hold and perform maths on data.

        Create a table called users another called functions and a third called users_functions.

        Import the data into the database tables.

        The SQL to find users with certain functions and functions by user becomes a trivial SELECT statement.

        Comment


          #5
          My VBA skills are sketchy at best and I don't have access to Access or another SQL database to use to do it.

          I'll take it as a no and tell the client to sort it themselves
          "Being nice costs nothing and sometimes gets you extra bacon" - Pondlife.

          Comment


            #6
            Originally posted by DaveB View Post
            I'll take it as a no and tell the client to sort it themselves
            Did you have a look at Pivot Tables?
            These allow you to construct 'report-like' tables from a list of data.
            They may be able to do what you want.
            Cooking doesn't get tougher than this.

            Comment


              #7
              1) Select the cell that would be the origin of the matrix

              2) Validate the column of functions as a list (Data > Validation)

              3) Insert two rows above the users

              4) the first row you have just inserted is going to show the function you have interested above each user. So if the selected function 'FUNC1' is selected all the users will have FUNC1 above them. '=$A$1' drag across all users.

              5) the 2nd row you inserted type =IF(VLOOKUP($A$1,your array,2,FALSE)='x',TRUE,FALSE)

              for the 2nd user it would be: =IF(VLOOKUP($A$1,your array,3,FALSE)='x',TRUE,FALSE)

              =IF(VLOOKUP($A$1,your array,4,FALSE)='x',TRUE,FALSE)

              =IF(VLOOKUP($A$1,your array,5,FALSE)='x',TRUE,FALSE)

              and so on..

              Now each user will have TRUE or FALSE if the function matches. You could use some form of conditional formatting to make this more obvious.

              Better still you can now transpose the rows with USER and TRUE or FALSE and filter as normal.



              No macro, no code, no problem :O)
              Last edited by scooterscot; 20 June 2008, 09:08.
              "Never argue with stupid people, they will drag you down to their level and beat you with experience". Mark Twain

              Comment


                #8
                I would agree with the Prawn, or something similar. All the sensible options involve reshaping your data, probably into a table with 3 columns: user; function; yes/no. Then you'd be able to use the Excel autofilter.

                Comment


                  #9
                  Export it to Access, even a numpty like me can do what you want then with just a very rudimentary understanding of SQL queries!
                  Public Service Posting by the BBC - Bloggs Bulls**t Corp.
                  Officially CUK certified - Thick as f**k.

                  Comment


                    #10
                    Definitely something that should be done with a RDBMS, but you may be able to garner some Brownie points by using scooterscot's solution whilst explaining that to them

                    Comment

                    Working...
                    X