+ Reply to Thread
Results 1 to 5 of 5

Adding Subtotal formula with VBA

  1. #1
    Registered User
    Join Date
    06-07-2007
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Adding Subtotal formula with VBA

    Hi All!

    I am desperately trying to add a simple subtotal formula but receive the same error ("Type mismatch"):

    Please Login or Register  to view this content.
    Thankful for all your help!

    //Jenny
    Last edited by jennyc2; 05-04-2009 at 09:34 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Adding Subtotal formula with VBA

    You should be using either Range("A1") or Cells(1,1)
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-07-2007
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Adding Subtotal formula with VBA

    Thanks for your reply!

    You were right that it was the first problem, although I still haven't gotten the subtotal to work. More simple formulas are added, like this:
    Please Login or Register  to view this content.
    But when it is a formula slightly more complicated, like IF or SUBTOTAL, I get an error:
    Please Login or Register  to view this content.
    -> Application defined or object defined error (same with the first example in my original post)

    //J

  4. #4
    Registered User
    Join Date
    04-23-2009
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2002
    Posts
    9

    Re: Adding Subtotal formula with VBA

    Shouldn't this be:
    Please Login or Register  to view this content.
    , instead of ;

  5. #5
    Registered User
    Join Date
    06-07-2007
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Adding Subtotal formula with VBA

    Yes, how odd - the "," where made into ";" when they ended up on the sheet. Thank you thank you thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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