Closed Thread
Results 1 to 2 of 2

SumIf WorksheetFunction referencing another workbook

  1. #1
    Registered User
    Join Date
    10-05-2013
    Location
    indonesia
    MS-Off Ver
    Excel 2013
    Posts
    6

    SumIf WorksheetFunction referencing another workbook

    Dear all,

    I'm trying to use the SumIf worksheetfunction in VBA, looking in another workbook, but I apparently use the wrong reference. It works without any problem in Excel. I receive the following pop up message : "method range of object worksheet failed"

    Here is my code :

    Please Login or Register  to view this content.

    I understand that to be proper, I should use workbooks(File).worksheets("Budget 2013").range("Q5:Q52"), but I'm afraid that my code will be too long, because I'd like to use many conditions (with SumIfs)...
    I already tried many attempts without any success, would you have any idea about my mistake?

    Many thanks in advance for your lights.

    Best regards,

    Eric

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,929

    Re: SumIf WorksheetFunction referencing another workbook

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] SumIf WorksheetFunction referencing another workbook
    By eric_deltour in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2013, 07:22 PM
  2. [SOLVED] Error Using WorksheetFunction.SumIf
    By unvme1212 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2013, 01:52 PM
  3. [SOLVED] SUMIF function don't return same result with Evaluate and Application.WorksheetFunction
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2012, 12:48 PM
  4. Replies: 0
    Last Post: 06-01-2012, 03:18 AM
  5. vba and conditional totalling ... WorksheetFunction SumIf ?
    By SA3214 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-29-2005, 03:05 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