+ Reply to Thread
Results 1 to 4 of 4

If multiple critera matches then return value

  1. #1
    Registered User
    Join Date
    09-02-2016
    Location
    Sydney
    MS-Off Ver
    Office 2013
    Posts
    8

    If multiple critera matches then return value

    Hi all,

    Long time lurker first time poster

    I've attached an example of what I'm trying to achieve as I've had no luck working it out thus far.

    Essentially it's a daily time sheet with the names selected via a drop down box and SUMIF to total the daily hours worked, the trouble I'm having is as you can see from the example is employees work split shifts and when the split shifts are added together I get the same total in E5 & E6 as expected.

    My question is how do I return a value of '0' in E6 if the same value already exists in column E and name matches from column A

    excel example.JPG

    Thanks in advance

    LC

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

    Re: If multiple critera matches then return value

    Maybe like this ...

    =IF(COUNTIF($A$5:A5,A5)=1,"Your formula",0)

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If multiple critera matches then return value

    Hi,Hi,

    This looks like a much simplified example and maybe doesn't represent the production data. We often find that when we give an answer to what is a trivial non representative example, when the solution is used with the real world data it doesn't work because of factors like different permutations, sorted/unsorted, string length and other stuff which is important but hasn't been mentioned.

    We generally like to see the real workbook (or at least a cut down copy), and manually added results that you expect to see.

    That said is there any reason to believe that the SUMIF won't return the same value for the same name? That would be the case if the data covered say different dates and you're looking for a total per day but your data doesn't suggest its anything other than a single day. In which case just wrap you formula in an =IF(COUNTIF()) formula

    e.g.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    note the absolute and relative range references in the COUNTIF - this is important.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    09-02-2016
    Location
    Sydney
    MS-Off Ver
    Office 2013
    Posts
    8

    Re: If multiple critera matches then return value

    Thanks for the quick replies!

    Richard you are correct in suggesting it's not from the original data sheet and will certainly keep that in mind when asking for helping in future.

    Formula worked great, thank you.

+ 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. Replies: 2
    Last Post: 03-03-2014, 10:03 PM
  2. Lookup and return multiple matches across multiple sheets
    By somnath6309 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-07-2013, 02:44 AM
  3. Lookup and return multiple matches across multiple sheets
    By somnath6309 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 03:45 PM
  4. Look up and return multiple matches
    By ShoshanaM in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2013, 05:59 PM
  5. Search named range for multiple matches to critera and return date & values
    By a.mack123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2011, 10:07 AM
  6. Replies: 2
    Last Post: 07-14-2011, 09:04 AM
  7. Excel 2007 : Return Multiple Matches
    By GaidenFocus in forum Excel General
    Replies: 8
    Last Post: 11-23-2010, 12:37 PM
  8. Count if number matches critera
    By lazyme in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-29-2007, 04:52 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