+ Reply to Thread
Results 1 to 4 of 4

subtotal macro: to subtotal only a few amounts

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    subtotal macro: to subtotal only a few amounts

    I'm looking for a simple macro to subtotal a few numbers. Imagine entering amounts in cell A2, A3, A4, and A5. In cell A6 I want to enter a subtotal formula with the fewest keystrokes. I want the macro to enter " =subtotal(9, " and not exit the cell. I know I can activate "auto complete formula" in preferences but was wondering if I could write a macro. Thank you

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: subtotal macro: to subtotal only a few amounts

    This is a sheet specific macro

    Right click on the filename at the bottom of excel and select view code.

    paste this code into the window that opens and close it.

    Please Login or Register  to view this content.
    Right click below your data to create the subtotal formula.

  3. #3
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    Re: subtotal macro: to subtotal only a few amounts

    How do I select view code? I have Excel 2011 for Mac. Thank you for your quick reply.

  4. #4
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    Re: subtotal macro: to subtotal only a few amounts

    I copied this into my Personal Macro Workbook. When I right click where I want the subtotal, I don't see anything to choose to make this work. I looked in Visual Basic Editor and it shows up as Module8. I looked under Tools/Macro/Macros and this macro doesn't show up. Please advise.

+ 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. Replies: 1
    Last Post: 09-18-2013, 04:10 PM
  2. Replies: 8
    Last Post: 07-31-2012, 09:41 AM
  3. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  4. Subtotal coded amounts sorted in numerical order
    By mikeburg in forum Excel General
    Replies: 4
    Last Post: 08-20-2007, 07:40 PM
  5. Replies: 3
    Last Post: 03-08-2006, 05:25 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