+ Reply to Thread
Results 1 to 10 of 10

Unable to get SUM property of the worksheetfunction class

  1. #1
    Registered User
    Join Date
    12-19-2015
    Location
    Reading, England
    MS-Off Ver
    10
    Posts
    9

    Unable to get SUM property of the worksheetfunction class

    I had a simple delete rows macro based on a range summing to nil that worked in testing at home and then it didn't when I really need it to work at work..

    Code is:

    Please Login or Register  to view this content.
    Help please!

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Unable to get SUM property of the worksheetfunction class

    Well... could you please post a sample of the looking of your Workbook?

  3. #3
    Registered User
    Join Date
    12-19-2015
    Location
    Reading, England
    MS-Off Ver
    10
    Posts
    9

    Re: Unable to get SUM property of the worksheetfunction class

    I will do tomorrow morning. I was using it as a Function and calling it from another much larger routine to tidy up the end result (taking any row with "Total" in it or nil value , and it all worked fine when I was testing at home. Im sure I gave it a run a t work as well. I ramble on. I'll post sample of workbook tomorrow.

    The line it is hanging on is
    Please Login or Register  to view this content.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Unable to get SUM property of the worksheetfunction class

    I really like to use the Union feature for programs like this - try:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Registered User
    Join Date
    12-19-2015
    Location
    Reading, England
    MS-Off Ver
    10
    Posts
    9

    Re: Unable to get SUM property of the worksheetfunction class

    Hi Aka
    Can you explain (in layman's terms) what you are recommending here. Don't you need to give U value before you set the if statement? I have really limited time tomorrow (in the middle of month end and lost several hours today due to various issues, my delete rows macro being 5% of them!). Why do you think this will work? (I don't like black boxes, mysteries etc..!). Thanks in advance for your support.
    Chris

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Unable to get SUM property of the worksheetfunction class

    I know this works - I use it all the time, it may be the quickest ( without using the Filter feature ) way to dump a bunch of rows.

    Please Login or Register  to view this content.
    Will set any qualified Range.

    You might want to change this line in case you get a "dry run"
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-19-2015
    Location
    Reading, England
    MS-Off Ver
    10
    Posts
    9

    Re: Unable to get SUM property of the worksheetfunction class

    Hmmm. Really frustrating. After a very long week I ran the original macro again last night and the pesky thing worked as part of a call function of the larger macro consolidating data from a sample of feed files.
    If I get time I'll run some more tests next week on larger set of files to see if I can replicate error. Orin - I'll have a play with the Union code which will hopefully make more sense when I see what it does in action.

    Thanks for suggestion.

    If I can't replicate the issue I had Ill close the thread.

    Chris

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Unable to get SUM property of the worksheetfunction class

    OK - Let's see

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Unable to get SUM property of the worksheetfunction class

    Re: Unable to get SUM property of the worksheetfunction class
    Don't you have Error value within a row?
    If so, try something like
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    12-19-2015
    Location
    Reading, England
    MS-Off Ver
    10
    Posts
    9

    Re: Unable to get SUM property of the worksheetfunction class

    Ahh, Jindon, You may be on to something. The first column of data has a lookup formula in it which, as it is currently written, could return an error value in some circumstances. I'll check it out Monday. 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] Unable to get the average property of the worksheetfunction class
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-01-2015, 01:41 AM
  2. Unable to get the Vlookup Property of the WorkSheetFunction Class
    By jayeshsondhi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2015, 03:57 AM
  3. [SOLVED] Unable to Get the Vlookup property of the WorksheetFunction class
    By DrowingInVBA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2013, 02:02 PM
  4. Unable to get countIF property of worksheetFunction class
    By Deamo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-10-2010, 09:35 PM
  5. Replies: 2
    Last Post: 12-13-2007, 09:59 AM
  6. Unable to get Match property of the WorksheetFunction class
    By C++User in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-03-2006, 09:55 AM
  7. [SOLVED] Unable to get the Vlookup property of the WorksheetFunction class
    By DoctorG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2006, 02:55 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