+ Reply to Thread
Results 1 to 4 of 4

Sum used with index match and iferror

  1. #1
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Sum used with index match and iferror

    I have attached a sample of a worksheet I have been working on. It is a time sheet template.I need to be able to sum all values associated with the lunch break in a cell. I am using index match to detect when Y is listed in the D column and putting the corresponding value in cell E21. If no Y is found and cell E20 is greater than 6, it defaults to .50

    How do i add the appropriate sum function within the index match formula?
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sum used with index match and iferror

    Skip the INDEX(..MATCH, it's best left strictly for returning string values. For calculation, I'd stick with SUMPRODUCT and SUMIF.

    =if(e20<6,0,if(sumif(d$4:d$19,"y",e$4:e$19)=0,0.5,sumif(d$4:d$19,"y",e$4:e$19)))
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Sum used with index match and iferror

    This does put the default .50 in the cell but when I put a y in the d column it doesn't change the value to match.
    Start End Lunch Total time
    8:00 AM 8:45 AM 0.75
    8:45 AM 10:30 AM 1.75
    10:30 AM 12:30 PM 2.00
    12:30 PM 1:15 PM 0.75
    1:15 PM 3:30 PM Y 2.25











    7.50 total time
    0.50 lunch total (this needs to equal the value in e that corresponds to the y in D)This should be 2.25 not .5 and if the y was in multiple rows it would need to add all the e column values that matches the d row with a y in it.
    Last edited by tlstevens; 05-08-2015 at 02:38 PM.

  4. #4
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Sum used with index match and iferror

    I made a mistake when copying the formula and it changed column references. This works perfectly!!!

    Thanks!!!!!!!!!!!

+ 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. [SOLVED] Iferror, index & match
    By meh999 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-26-2014, 08:43 AM
  2. Index, Match, Iferror and lots of problems
    By Sherp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2014, 12:00 AM
  3. nested iferror index match for 10k rows
    By bruno08102013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2014, 12:46 PM
  4. Adding IFERROR to INDEX MATCH
    By brad999 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2013, 04:18 AM
  5. Looking for better formula of iferror, index and match
    By DavidRoger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2012, 07:50 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