+ Reply to Thread
Results 1 to 6 of 6

Obtaining name, project and hours from database

  1. #1
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    Office365
    Posts
    58

    Obtaining name, project and hours from database

    Sample file attached.
    I am trying to extract from a much larger database, all employees (up to 20) with hours against various project numbers.
    and have this listed by employee. Do not show employees with no assigned hours.
    Don't want pivot tables, but rather VBA or macros.

    Any help appreciated.

    RobN
    Attached Files Attached Files
    Last edited by Robn02; 03-07-2018 at 10:26 PM.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Obtaining name, project and hours from database

    the database is designed wrong, so you cannot pivot.

    the macro would have to dismantle the database , then rebuilt it in data terms, THEN you can pivot.

  3. #3
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    Office365
    Posts
    58

    Re: Obtaining name, project and hours from database

    Thanks Ranman... I am needing formula or VBA, not pivots.
    RobN

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Obtaining name, project and hours from database

    To get a formula solution to work I had to convert the data into record form (credit inspiration to ranman's post) as seen on sheet 2 of the attached file, which was accomplished using three formulas.
    1) For Project (array entered*):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2) For EMP:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3) For HRS:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula* which populates the result table on sheet 2 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are 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.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    Office365
    Posts
    58

    Re: Obtaining name, project and hours from database

    Thanks so much, JeteMc and Ranman256.
    Converting the data to record form was key! I would never have figured that out.
    Appreciate the fixed up spreadsheet as well. That was an education!
    Robn

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Obtaining name, project and hours from database

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. project work hours calculator
    By fael097 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-26-2017, 12:02 PM
  2. Sum Daily Project Hours based on Project Priority to 8 per day
    By junoon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2016, 01:39 PM
  3. Find out how many man hours is spent in each project
    By skhari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2015, 11:31 AM
  4. Database is very slow while opening Project
    By LilyMarie in forum Access Tables & Databases
    Replies: 1
    Last Post: 06-26-2009, 03:22 AM
  5. Add Project to 'database'
    By jieyi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2009, 06:09 PM
  6. Need help calculating project hours
    By udm1989 in forum Excel General
    Replies: 4
    Last Post: 10-05-2006, 11:47 AM
  7. Obtaining information from a database for a worksheet
    By Michelle Dean via OfficeKB.com in forum Excel General
    Replies: 4
    Last Post: 06-26-2005, 06:05 PM

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