Results 1 to 2 of 2

Macro to Create a Table After Manually Selecting an Output Range

Threaded View

clairexfy Macro to Create a Table After... 06-03-2015, 04:18 PM
clairexfy Re: Macro to Create a Table... 06-05-2015, 11:10 AM
  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Calgary
    MS-Off Ver
    2010
    Posts
    10

    Macro to Create a Table After Manually Selecting an Output Range

    Hi,

    I have already created a few macros to format the data that I'm working with. I just need one more step that I can't figure out.

    I'd like to create a summary at the bottom of all the data - originally, I did this with the following code:

    Sub Summary()
        Range("J60").Select
        ActiveCell.FormulaR1C1 = "TABLE TITLE"
        Range("J61").Select
        ActiveCell.FormulaR1C1 = "No"
        Range("J62").Select
        ActiveCell.FormulaR1C1 = "Yes"
        Range("J63").Select
        ActiveCell.FormulaR1C1 = "Total"
        Range("K61").Select
        ActiveCell.FormulaR1C1 = _
            "=SUMIF(R[-56]C[-4]:R[494]C[-4],""No"",R[-56]C[-2]:R[494]C[-2])"
        Range("K62").Select
        ActiveCell.FormulaR1C1 = _
            "=SUMIF(R[-57]C[-4]:R[493]C[-4],""Yes"",R[-57]C[-2]:R[493]C[-2])"
        Range("K63").Select
        ActiveCell.FormulaR1C1 = "=SUM(R[-2]C:R[-1]C)"
    End Sub
    However, since the data I'm working with gets exported around every week, and every week the data changes (i.e. the # could increase or decrease), I realize I can't use absolute cells in case they overlap with the data. I was hoping to create a Macro that would prompt the user to select where they want the table placed, and then have the macro do the rest of the work summing and such, but I'm not sure how to do this. Any help is much appreciated.

    Thanks in advance!
    Last edited by clairexfy; 06-05-2015 at 11:10 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create Macro to use Scanner to find product in list and add information manually
    By solidrock1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2014, 07:06 PM
  2. Cannot create a new worksheet manually or with a macro. ("That command cannot be used...)
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2013, 04:26 PM
  3. Manually create an excel readable table
    By zoltain in forum Excel General
    Replies: 2
    Last Post: 07-28-2011, 03:44 PM
  4. Replies: 7
    Last Post: 06-19-2006, 01:20 PM
  5. pivot table - works manually not by macro
    By jnewl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2006, 08:50 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