+ Reply to Thread
Results 1 to 15 of 15

Display table of data based on lookups

  1. #1
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Display table of data based on lookups

    Hi All,

    Please see attached workbook -

    I'd like the "Query" tab to auto update the rows in blue: "Current Roles" and "Courses Required" based on the tables in the remaining tabs.

    I think this is an INDEX formula ?

    Many thanks,
    Paul
    Attached Files Attached Files
    Last edited by trench3368; 01-08-2018 at 11:09 AM.

  2. #2
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Below is the screenshot of the page I am trying to automate:

    Jobs & Skills.jpg

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Display table of data based on lookups

    In B3 of "Query"


    =IFERROR(INDEX(Employees!$B$1:$O$1,,SMALL(IF(INDEX(Employees!$B$2:$O$5,MATCH($B$1,Employees!$A$2:$A$6,0),0)="x",COLUMN($B$1:$O$1)-COLUMN($B$1)+1,""),ROWS($A$2:A2))),"")


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    What are the criteria for selecting the course?

    COSHH for example applies to all the selected roles for "Alice" as does "Site Safety"

    Is it any course which covers ALL roles selected?

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Display table of data based on lookups

    ... and update your profile about Excel version. Now it is not compatibile because Ex2003 doesn't support xlsx extension.

  5. #5
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Many thanks John, I've got the "current roles(s)" lookup working here.

    The criteria for selecting the courses is the matrix on the courses tab - so an "x" indicates a required course for a certain role.

    So COSHH is required for all roles - and for example "First Aid Procedure" is required to only two roles "Depot Safety Rep" and "Yard Checker"

    I not sure if it will complicate matters to lookup values from a previous lookup i.e. current role(s) ?

    Hope this makes sense, and many thanks for your help

    Kind regards,
    Paul
    Last edited by trench3368; 01-08-2018 at 08:25 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Display table of data based on lookups

    As any course can cover multiple roles e,g COSHH it is notclear to me how the courses in you sample have been selected:

    why was "Stacking of equipment" selected but not (for example) "Movement of Vehicles in Yard" ?

  7. #7
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Hi John,

    Good spot, the courses vary by Type - so some courses are talks given by line managers and others are simply handouts to read / forms etc... I could probably remove the safe systems of work type - does this help?

    Kind regards,
    Paul

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Display table of data based on lookups

    I found 15 courses which cover (applied to) each of the roles in your example ... : these appear to be "generic" i,e Apply to all roles,

    COSHH
    Site Safety Induction
    Manual Handling
    Noise
    H&S Law - What you need to know & do
    Depot Housekeeping
    PPE
    Eye Protection
    Noise & Hearing Protection
    Use of Ladders & Step Ladders
    Manual Handling
    Site Welfare
    Dust and Fumes
    Accident Prevention
    Hand Protection

    I assume the above can be filtered by removal of "safe systems of work type" ?

    By contrast, "Stacking of equipment" applied only to 4 (of the 8 roles in the sample file).

    Sorry, but the selection criteria is not obvious to me!

  9. #9
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Hi John - Sorry this isn't clear, we could remove safe systems of work.

    So for Alice she will need to take COSH only once, even though it applies to all her roles.

    Ideally Excel will generate the (albeit long) list of required training course for Alice - I think the results should show the required "Document-ID" as this is a unique reference.

    Does this help ?
    Last edited by trench3368; 01-08-2018 at 09:27 AM.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Display table of data based on lookups

    I tried to visualize your needs
    is that what you want?
    but... it doesn't work without PowerQuery add-in for Ex2010 Pro Plus.
    Attached Files Attached Files
    Last edited by sandy666; 01-08-2018 at 09:43 AM. Reason: file updated about PivotTable

  11. #11
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Hi Sandy, thanks but I can't seem to get it working here

    I was thinking perhaps it might be easier to hide the rows that don't apply ?

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Display table of data based on lookups

    I understand you cannot install PowerQuery add-in.
    No prob.
    So wait for John's solution or any other person.

  13. #13
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Dear All - I've also uploaded a second file (v2) - trying to get at a solution

    Does anyone know what formula will return a Yes / No in the yellow column ?

    Many thanks - this problem is troublesome for me.

    Paul

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Display table of data based on lookups

    In D13 of "Query"

    =IF(SUMPRODUCT((Courses!$D$1:$Q$1=$B$3:$B$10)*(Courses!D2:Q2="x")),"Yes","No")

    Copy down

  15. #15
    Registered User
    Join Date
    07-04-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Display table of data based on lookups

    Many thanks John - that's perfect !

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Value lookups from a table
    By FinGhost in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-20-2016, 06:10 PM
  2. [SOLVED] Display values based on input / output table
    By zdimitrov in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2015, 09:12 PM
  3. [SOLVED] How to deal with blank data options for LOOKUPS from a table
    By Attrition in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2014, 04:47 PM
  4. [SOLVED] Display a Table based on a pulldown menu.
    By aelingil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2012, 09:23 PM
  5. Replies: 1
    Last Post: 01-22-2012, 01:06 AM
  6. VBA and Table Lookups - HELP !
    By Luciferlicks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2011, 03:06 AM
  7. Lookups in a table range?
    By Mike1987 in forum Excel General
    Replies: 14
    Last Post: 06-21-2011, 04:32 AM

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