+ Reply to Thread
Results 1 to 4 of 4

Pulling data from a tbl

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    UK
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    35

    Question Pulling data from a tbl

    hi all,
    iu have a table with a list of people in one column, and the other columns are jobs which need to be done. what code would i use to gothrough the list and then create task for each person depending wether the task is ticked for them

    [Name] [Job1] [Job2] [Job3] ................................................
    P1 X X
    P2 X X
    .
    .
    .

    in the task table P1 would have a task called Job1 and one called Job3
    and P2 would have one called Job2 and one Job3
    basically scrolling through the table and using the header as the string if the checkbox equals true.
    if someone could help with this that would be great

    Thanks in advance

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Pulling data from a tbl

    You have a normalization issue that will make this difficult.

    Please read this on building a relational database.

    http://www.deeptraining.com/litwin/d...aseDesign.aspx

    You have your table set up as if it were a spreadsheet.

    It should probably resemble this. I envision at least two tables and possibly three

    tablename
    NameID PK
    FName
    LName
    Other fields as needed

    JobTable
    JobID PK
    JobDescription

    TaskTable
    TaskID PK
    NameID FK
    JobID FK

    Once you have a normalized db, you can run queries to determine assignments,etc.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-09-2012
    Location
    UK
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    35

    Re: Pulling data from a tbl

    i do have it set up like that, so what would i do to create a new job for a person with a query?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Pulling data from a tbl

    It would help if you posted some sample data of what is in your tables and what the expected results should look like. I don't quite get it from the example shown. Please show real life type (although ficticious) data. Pictures say a lot sometimes.

+ 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