Results 1 to 25 of 25

VBA to split commissions from one sheet to multiple sheets and summarize by account type

Threaded View

  1. #1
    Registered User
    Join Date
    09-14-2018
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    23

    VBA to split commissions from one sheet to multiple sheets and summarize by account type

    Hey this is my first time posing a question. Up to this point, I have been able to scour the internet for formulas or macros to help me create complex Excel files that automate tasks. This situation is a little more complex and I need some help from someone much smarter than me.

    What I'm trying to do is this:
    1. Each month I get a commissions payout report from SalesForce and export to Excel. I copy and paste it into an Excel template with the macros.
    2. This data lists all of the customers that had salespeople on it and the commissions that they earned in the prior month. There could be anywhere from 1-4 salespeople per account. It is possible that there is no salesperson in the Salesperson 1 field but there are salespeople in the other salespeople fields.
    3. Then I would like to run a macro that takes that report data and creates a new tab in Excel for each salesperson. Since there are 4 columns for salespeople, a particular salesperson could be listed in any of those 4 columns and I would need the macro to be able to find a particular salesperson and extract their commissions for each customer no matter which column they were in. If there are multiple salespeople per account, then that customer could appear on each salesperson's report with the corresponding commissions. Our current method is to create a PivotTable, select the salesperson then print. We would then change the PivotTable to select Salesperson 2, 3, and 4 and sum all the data from those 4 pivots to create the final report, but with 40+ salespeople and more getting added in the future, that process is cumbersome. Another way we used to do it was to create a report per salesperson from SalesForce but running 40+ individual reports took too long.
    4. After all of the sheets are created for each salesperson, we would like to summarize that data on each of those sheets based on the type of account: Electric or Gas. If we can do this step with step 3 that would be ideal.

    The SalesForce report spits out additional columns that are not needed for this task so the file that is attached only has columns for the criteria that I need for the macro. The info in the file is also for examples only. It includes a tab called Ideal Report which shows how we would like to see the report for each salesperson.

    Please include comments where you change code so that I can follow it and make changes to variables if I need to. I'm hoping this is possible.

    Research:
    I was going to post my code from the macro here but my company's firewall is preventing me from doing it. Arg. Anyways, it's in the file.

    Functions needed for this code are located in another module in the example file. Those seem to work fine.

    After changing the column value to "N" for the range of data, and the criteria column to "7" for Column G, I can't get my headers in row 6 to copy over to each of the new sheets. I'm at a loss on how to get them back.

    Any help would be appreciated! Thanks!
    Attached Files Attached Files
    Last edited by xceler8or; 09-25-2018 at 11:48 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Split one Sheet into multiple sheets
    By puneetjain in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-14-2018, 04:19 AM
  2. Replies: 4
    Last Post: 06-13-2014, 01:20 PM
  3. [SOLVED] Split Data from one sheet into multiple sheets
    By jstewart22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2013, 06:54 PM
  4. need vba to split sheet into multiple sheets
    By thuff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2013, 04:39 PM
  5. [SOLVED] Split large sheet in multiple 1000 row sheets
    By thotosch in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2013, 06:29 AM
  6. [SOLVED] Split master sheet data to multiple sheets in same workbook
    By Apple Ling in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 10:39 PM
  7. i need to split excel work sheet into multiple sheets
    By samehnabil in forum Excel General
    Replies: 1
    Last Post: 08-16-2012, 07:54 PM

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