+ Reply to Thread
Results 1 to 3 of 3

Formula to look at multiple cells with the same data, but only return a value once

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    19

    Formula to look at multiple cells with the same data, but only return a value once

    Hi,
    I am working on a roster sheet that I am having trouble working out a formula for. It should be so simple, but yet I can't seem to get it to work.

    For Example: If I enter an employee number into cell A1 an in cell B1 is the allowance for uniform, I need a formula that will lookup all of column A, and if this is the first instance of this employee number cell B1 should =$2.05. But the formula needs to be able to recognise that if the employee number occurs more than once, I only want it to pay the $2.05 once and not on every occurance of the employee number

    Any help would be appreciated.

    Cheers

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula to look at multiple cells with the same data, but only return a value once

    Hi Jonas245

    Try looking at vlookup function, in case of any issue upload a small sample workbook. Thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula to look at multiple cells with the same data, but only return a value once

    If the Employee Number gets entered at A1, and they list of employees requesting uniforms starts at A2; and B1 is the allowance for uniforms, try this in C1:
    =IF(COUNTIF($A:$A,$A$1)>1,"Already Used Allowance","Gets "&$B$1)

    This Assumes the employee numbe is not already in the list, If (for whatever reason) it is, but is still eligible for the allowance if they only appear once:
    =IF(COUNTIF($A:$A,$A$1)>2,"Already Used Allowance","Gets "&$B$1)

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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