+ Reply to Thread
Results 1 to 5 of 5

A lookup function to return a persons function which will vary depending on dates

  1. #1
    Registered User
    Join Date
    09-25-2020
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    4

    A lookup function to return a persons function which will vary depending on dates

    I need help trying to get Excel to look up personnel's function which may change depending on what activity they are tasked to work on. Activities are time driven and may last a period of months before they may revert to their original function or onto a new function. Each function then attracts a different rate.

    For instance person A can be an R3 between 01/01/2020 and on the 03/02/2020 they may operate as an RA and return to being an R3 the following month. I've tried using variations of VLookup (not sufficient to cf function AND dates) and XLookup (returned #SPLL error) as well as INDEX and MATCH but they're giving me a result that is definitely NOT the correct answer.

    In my personnel reference table I have:

    Column A - Name
    Column B - Start Date of Function
    Column C - End Date of Function
    Column D - Function
    Column E - Typical Hours

    I've attached an example of the personnel function list - this is just an example, obviously I cannot share the actual data. I have a list of 155 personnel with multiple entries where the person would be operating as a different function - there are 7 individual functions each attracting a different hourly rate.

    Personnel Function.JPG


    In a new table I'm trying to compile (based on time sheets) lists all of the works and personnel to date (currently at over 10,000 lines) and I need to allocate their function, I really don't want to manually go through each time-sheet tracking the change in function but as different functions attract different rates it is imperative this is correct and VLOOKUP only returns their original function.

    Column A - Date
    Column B - Name
    Column C - Function - this is where I want to identify what the person was doing during the course of the Works.
    There are more columns tracking Unit Rates, Total Costs


    If you could help me that would save me a lot of google time and hair pulling.
    Last edited by lloydalikes; 09-25-2020 at 08:32 AM.

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: A lookup function to return a persons function which will vary depending on dates

    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

  3. #3
    Registered User
    Join Date
    09-25-2020
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    4

    Re: A lookup function to return a persons function which will vary depending on dates

    I've attached a representative example, I've also include a couple of examples (columns C & D) I've picked out from these forums but they're still not returning the correct result. Column F includes what the correct lookup result should be.

    Many thanks in anticipation.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: A lookup function to return a persons function which will vary depending on dates

    Try this:

    =LOOKUP(1,0/(B2='Personnel & Trades'!A$2:A$1002)/(A2>='Personnel & Trades'!B$2:B$1002)/(A2<='Personnel & Trades'!C$2:C$1002),
    'Personnel & Trades'!D$2:D$1002)

  5. #5
    Registered User
    Join Date
    09-25-2020
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    4

    Re: A lookup function to return a persons function which will vary depending on dates

    This is perfect, thank you very much

+ 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. Help with lookup function with dates
    By bcc2017 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-17-2018, 11:56 AM
  2. [SOLVED] Nest lookup Function to lookup name between date range and return value
    By bbeards in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2018, 01:37 PM
  3. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  4. [SOLVED] Date function of tow persons duty
    By funtastic in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-22-2012, 06:45 AM
  5. LOOKUP function to return row number
    By ameliiie in forum Excel General
    Replies: 1
    Last Post: 07-12-2011, 04:40 AM
  6. Lookup function for dates
    By stevendt in forum Excel General
    Replies: 2
    Last Post: 03-06-2011, 02:57 PM
  7. Nested Lookup Function to Return a Value
    By ArenaNinja in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-25-2007, 12:44 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