+ Reply to Thread
Results 1 to 2 of 2

MACRO to Calculate Amounts if ID matches in different sheet

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    MACRO to Calculate Amounts if ID matches in different sheet

    I have been trying to teach myself macros online but have not been able to write a successful macro that does what I need.
    First, the workbook has 5 total sheets.
    The first 4 sheets are current data sets of employee data, existing accounts, new accounts, and sales.
    Each data set is tied by the Sales Agent ID.
    On the fifth, PAY, sheet I need

    A button that calculates the total pay due to the SALES ID by
    a. Calculating the Commission on the sales agent's existing accounts
    -Finding all the records from the Exisiting Accounts sheet with the matching Sales ID and totaling the revenue and pasting into the CUrrent Revenue on the PAY Sheet
    -Multiplying the Existing Account % by the Current total revenue generated by the accounts in the Mo. Commission
    b. Calculating the bonus total for the number of new accounts the sales agent closed by
    -finding all the records from the New Accounts sheet with the matching SALES ID and counting the number of new accounts and pasting that count number into Mo. New Acct. Count on PAY sheet
    -multiplying the New Account Bonus $ amount by the number of Mo. New Acct. Count and pasting the total bonus amount due in Mo. Bonus on PAY sheet
    c. Calculating the sales commission due based on the sales agent's monthly sales made
    -Finding all the records from the Mo. Sales sheet with the matching sales ID and totaling the Sales Amount $ and pasting into the Sales Amount on the PAY sheet
    -Multiplying the Sales % by the Sales Amount and pasting the amount into the Mo. Sales Com. on the PAY sheet
    d. Calculating the total pay due to the Sales agent by
    -the Sum of the Base Value + Mo. Commission Value + Mo. Bonus Value + Mo. Sales Com. value


    I've attached a file of dummy test data for reference

    Any help would be greatly appreciated!

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: MACRO to Calculate Amounts if ID matches in different sheet

    Duplicate post.

    http://www.excelforum.com/excel-prog...ml#post3499581

+ 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. Formula to take amounts from other sheet with no duplicate amounts
    By Xx7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-06-2013, 04:34 PM
  2. [SOLVED] If-formula to calculate the different net amounts from a gross
    By Postlki1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2013, 05:54 AM
  3. Replies: 5
    Last Post: 11-03-2012, 04:22 PM
  4. Stop running the macro if sheet name matches
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2011, 10:21 AM
  5. Compare Sheet 1 and Sheet 2, and find matches and non-matches
    By danNAD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2010, 03:59 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