+ Reply to Thread
Results 1 to 5 of 5

Help with "SUMIFS" formula

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    Bristol, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Exclamation Help with "SUMIFS" formula

    Hi all

    I'm creating a database for employee's attendance. I have created a sheet called "Raw Overview" whereby the totals of sickness/holiday etc are calculated according to the employee and month.

    The code I currently have is
    Please Login or Register  to view this content.
    but it returns "#VALUE!"
    'Employee' is a range I made just by ctrl + shift + down arrow in the column, same with 'date' but I am constantly adding data - is there anywhere I can tell excel to rename the range when a new field is added?

    The information will be pulled from worksheet "Raw Data" where new entries are added daily using a userform, so I'm finding it hard defining where excel needs to look.
    "Raw Data" sheet Raw Data to use.PNG
    "Raw Overview" sheet Overview.PNG

    I have attached the workbook for any who can help me.
    Attendance Master - EXCEL HELP.xlsm

    SO:
    1. Can somebody confirm that the above formula I am using is correct? It seems to work but I can't copy and paste it. It should be pulling data from the dates between 1st jan and 31st.
    2. Can excel rename a range after it adds a new row of data to it?
    Last edited by jpoppet; 12-09-2013 at 10:05 AM. Reason: Managed to figure out one formula

  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: Help with "SUMIFS" formula

    The syntax of the function is incorrect.

    =SUMIFS('Raw Data'!E2:E1048576,date,">1/01/2013,<31/01/2013",Employee,'Raw Overview'!A3)

    It should be:

    SUMIFS(sum range, range 1, criteria 1, range 2, criteria 2, etc)

    If you want to declare a date range, you need to make it two separate conditions. Also, it's more reliable to break the operators out from the value you're comparing via concatenation.

    =SUMIFS('Raw Data'!E2:E1048576,date,">1/01/2013,<31/01/2013",Employee,'Raw Overview'!A3)

    This would more accurately be translated to

    =SUMIFS('Raw Data'!E2:E1048576,date,">"&"1/01/2013",date,"<"&"31/01/2013",Employee,'Raw Overview'!A3)
    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
    04-18-2013
    Location
    Bristol, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Help with "SUMIFS" formula

    Thank you - just to be clear can you confirm this is correct?
    Please Login or Register  to view this content.
    = Add the total of cells between E2 and E1048576 in sheet 'Raw Data', if the date of the field in range 'date' is between the dates of 01/01/2013 and 31/01/2013

    This will help me understand for future ref :-) What do you mean when you referance 'Operators' ?

  4. #4
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Help with "SUMIFS" formula

    J - on your second question, you can create a dynamic range, i.e. the range size changes as new information is added. See this link: http://support.microsoft.com/kb/830287

    Cheers
    <-- If you're happy & you know it...click the star.:-)

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

    Re: Help with "SUMIFS" formula

    I meant the breaking out of the < or > compared to what is being evaluated.

    For example, =countif(A1:A10,">5") works sometimes, but other times it will also look for cells that literally have ">5" in them. By breaking out the ">" and concatenating it with the &, you tell Excel that to do something with > instead of just look for it.

    As for searching 1,048,576 rows of data to do your calculations, you might find this to be extremely burdensome on the processing speed once you have more than a couple of dozen of these formulas. Converting your range to a table would allow your formulas to automatically adjust as new lines of data are added, instead of telling it upfront to always searching a million rows.
    Last edited by daffodil11; 12-09-2013 at 11:19 AM.

+ 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. I am new to macros and need help with this formula- I believe "Sumifs" is the way to go
    By brownsouthfl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2013, 04:59 PM
  2. SUMIFS Function To Reset SUM if "x" is placed to "0" ??
    By Exceldummy101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2013, 04:45 PM
  3. can a "MINIF" formula be built, equivalent to "SUMIFS"?
    By jrtaylor in forum Excel General
    Replies: 4
    Last Post: 10-22-2011, 12:44 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM

Tags for this Thread

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