Results 1 to 11 of 11

Return first value (duplicates) based on multiple criterias

Threaded View

  1. #1
    Registered User
    Join Date
    12-15-2013
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    8

    Return first value (duplicates) based on multiple criterias

    Hi alle, hope someone can help me 

    I’m having trouble returning the first value, amongst duplicates based on multiple criterias

    I have 3 sheets, where 2 of the sheets are raw data and the third is one where I’ve combined the necessary data I need.

    S3 looks like the following:
    Name---------- Month---------- Year---------- Salary---------- Hours---------- Account
    Anne---------- 09--------------------2013---------- 5500---------- 145-------------------- ??
    Thomas----------09--------------------2013---------- 3500---------- 134-------------------- ??
    Anne---------- 10--------------------2013---------- 5400---------- 135-------------------- ??
    Beth---------- 10-------------------- 2013---------- 2000---------- 100-------------------- ??

    Salary is from S1, and Hours and Account are from S2.
    I’ve had to sum the hours, so that it would only occur in one row. S2 looks like this.
    Name---------- Month---------- Year-------------------- Hours---------- Account
    Anne---------- 09--------------2013-------------------- 45-------------------- 500
    Anne---------- 09--------- -----2013-------------------- 50-------------------- 500
    Anne---------- 09-------- -------2013------------------ 50-------------------- 500
    Thomas----------09---- ------------2013------------------ 69-------------------- 500
    Thomas----------09----------------2013-------------------- 30-------------------- 500
    Thomas----------09----------------2013-------------------- 5-------------------- 500
    Anne---------- 10---------------2013-------------------- 120-------------------- 510
    Anne---------- 10---------------2013-------------------- 15-------------------- 510
    Beth---------- 10--------------- 2013-------------------- 60-------------------- 500
    Beth---------- 10--------------- 2013-------------------- 40-------------------- 500

    My task now is to return the accounnumber from S2 into S3. Because they are duplicates, I can’t seem to figure it out.
    I’ve tried with an if & and function, like:
    If(and(s2year=s3year,s2month=s3month,s2name=s3name,s1account=500),500,510)
    But it only returns 510 all the way down. I’ve tried other ways and googling it, but I can’t seem to figure it out. I would rather not remove the duplicates, because as I said it’s the raw data, and I don’t want to touch that. Hope someone can help me 
    Last edited by krdka; 12-15-2013 at 06:12 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Return first value (duplicates) based on multiple criterias
    By krdka in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2013, 04:46 PM
  2. [SOLVED] Return MAX date based on two criterias
    By cedequ in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-04-2013, 05:11 AM
  3. Return to cell with multiple criterias
    By mmaxumus2008 in forum Excel General
    Replies: 5
    Last Post: 01-20-2012, 09:52 AM
  4. selecting multiple criterias to return one variable
    By mariasyrny in forum Excel General
    Replies: 4
    Last Post: 02-09-2009, 12:14 PM
  5. Replies: 4
    Last Post: 07-24-2008, 11:41 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