+ Reply to Thread
Results 1 to 3 of 3

Pull data from another worksheet based on multilpe search criteria

  1. #1
    Registered User
    Join Date
    01-29-2005
    Posts
    3

    Pull data from another worksheet based on multilpe search criteria

    Ok, here is probably a very simple question but I just can't figure it out. Here is what I have.
    2 worksheets

    - Worksheet 2 is a query from another database which contains several columns (date, name, total hours and a few others).

    - Worksheet 1 is basically a time sheet for the week.

    I need the cell in Worksheet 1 which corresponds with a date in Worksheet 2, also to match the name of persons timesheet, to input data from another column of the matched criteria into cell on Worksheet 1.

    Simply put - Cell in Worksheet 1 - If (date in Worksheet 1, C3 = date in Worksheet 2, column A) and (name in Worksheet 1, A2 = name in Worksheet 2, column B) then put column E's data into cell on Worksheet 1.

    I feel this may include a vlookup & if statement combo or possibly a match in there somewhere. I just don't know where to begin. I have even tried to write some VBA code behide the cell but had no luchk. Please help. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    if I read your question right:

    =SUMPRODUCT((sheet1!C3=Sheet2!A2:A5)*(Sheet1!A2=Sheet2!B2:B5)*(Sheet2!E2:E5))

    This returns data from sheet2 column E where date in sheet2 column a is date in cell c3 and name in sheet2 column b is name in cell a2

    extend rows on sheet2 as required
    not a professional, just trying to assist.....

  3. #3
    Registered User
    Join Date
    01-29-2005
    Posts
    3
    Thank you so much. That worked great. I knew it couldn't be too difficult. I was just looking to deep into it. Thanks again.

+ 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