+ Reply to Thread
Results 1 to 9 of 9

WorksheetFunction.SumIfs in vba doesn't work

  1. #1
    Registered User
    Join Date
    11-17-2017
    Location
    POLAND
    MS-Off Ver
    2013
    Posts
    25

    WorksheetFunction.SumIfs in vba doesn't work

    Hi,

    I have a problem with below function in my code. First line with code is working, but I wanted to make it smaller and after declaring, the second line with code isn't working:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Of course I've declared those two ranges:
    Please Login or Register  to view this content.
    Any ideas? :-)

  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 in vba doesn't work

    Hi,

    Technically both codes are wrong as you didn't qualify the Cells or Rows property
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: WorksheetFunction.SumIfs in vba doesn't work

    deleted this response

  4. #4
    Registered User
    Join Date
    11-17-2017
    Location
    POLAND
    MS-Off Ver
    2013
    Posts
    25

    Re: WorksheetFunction.SumIfs in vba doesn't work

    Hi,

    thanks for your response.

    Alright, but now with the proper qualify of Cells and Rows the first code is still working but the second isn't:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  5. #5
    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 in vba doesn't work

    Please post the full code or, preferably, a workbook. There is no difference between the two based on what you have said.

  6. #6
    Registered User
    Join Date
    11-17-2017
    Location
    POLAND
    MS-Off Ver
    2013
    Posts
    25

    Re: WorksheetFunction.SumIfs in vba doesn't work

    Sure, the whole code is:

    Please Login or Register  to view this content.
    The steps with "Offset" were recorded by macro recorder, but I'm trying to change it, because I don't want to use Offset property.

  7. #7
    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 in vba doesn't work

    What are you seeing as the result of the two Sumifs calculations?

  8. #8
    Registered User
    Join Date
    11-17-2017
    Location
    POLAND
    MS-Off Ver
    2013
    Posts
    25

    Re: WorksheetFunction.SumIfs in vba doesn't work

    Problem is solved. I made a stupid mistake, because while testing this I skipped directly to 'Create Formula part, so macro didn't see those two Set parameters:
    Please Login or Register  to view this content.
    Ehh, beginners difficulties... ;-)

    Thanks again for help!

  9. #9
    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 in vba doesn't work

    Ha! That made me chuckle.

    You're welcome.

+ 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. sumifs vs. Application.WorksheetFunction.SumIfs
    By flooyd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2016, 11:22 AM
  2. [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
  3. [SOLVED] WorksheetFunction.SumIfs + Variable
    By VitoBdG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2016, 10:21 AM
  4. [SOLVED] SUMIFS formula doesn't work. Can anyone help?
    By Bobz1983 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-28-2014, 11:17 PM
  5. Application.worksheetfunction.Match doesn't work with Concatenated Ranges
    By Ricardo Gomes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 07:19 AM
  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. SUMIFS asterisk on numbers doesn't work
    By n748 in forum Excel General
    Replies: 3
    Last Post: 06-30-2010, 07:49 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