+ Reply to Thread
Results 1 to 3 of 3

Worksheetfunction.sumifs always returning 0

  1. #1
    Registered User
    Join Date
    05-02-2018
    Location
    London
    MS-Off Ver
    MS 2013
    Posts
    58

    Worksheetfunction.sumifs always returning 0

    Hi all,

    I am trying to use a worksheets function.sumifs as follows, however it is always returning 0. When I do the formula for the sumifs on the sheet itself this is not the case, does anyone have any idea why?

    Please Login or Register  to view this content.
    The sumifs is referencing itself i.e J is the same as transdata(i,10) - i know this works in a formula but perhaps not the case in a vba?

    Thank you

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Worksheetfunction.sumifs always returning 0

    Can you post a workbook? Are you sure that TransDataCalcs(i, 3) has the value you expect?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Worksheetfunction.sumifs always returning 0

    A few questions...
    1. Why not just use the SUMIFS function, instead of VBA?
    2. Are you sure the values you are summing, really ARE values and not text looking like values?
    3. Are you sure that your criteria really does exist in the criteria range? If you think it does, check for spellings, extra spaces etc
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] WorksheetFunction.SumIfs in vba doesn't work
    By mati_WAR in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2017, 09:42 AM
  2. sumifs vs. Application.WorksheetFunction.SumIfs
    By flooyd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2016, 11:22 AM
  3. [SOLVED] WorksheetFunction SumIfs With Multiple Criteria
    By Harry Basra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2016, 08:32 AM
  4. [SOLVED] WorksheetFunction.SumIfs + Variable
    By VitoBdG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2016, 10:21 AM
  5. [SOLVED] Application.worksheetfunction.sumifs on large dataset
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2013, 08:22 PM
  6. How to use > in WorksheetFunction.Sumifs
    By davidman1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2013, 10:40 AM
  7. [SOLVED] Code optimization - WorksheetFunction.SumIfs() function
    By nfuids in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2012, 10: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