+ Reply to Thread
Results 1 to 11 of 11

What is the best approach to a commission report.. vba/formula/chart/table?

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    What is the best approach to a commission report.. vba/formula/chart/table?

    I wonder if someone can help me get started with a new task. I need to make a commission report for field sales reps easily available, it would need to do the following;

    . Selectable Calendar month, including progress of current month. from column b
    . Select between salesperson from column s

    . Show a count of records showing a "4" in column w
    ..Total value in column q for these records

    .Show a count of records showing a "8" in column w
    ..Total value in column q for these records divided by 2

    .Show a count of records showing a "12" in column w
    ..Total value in column q for these records divided by 3

    .Total these three figures for gross production.
    .Check each record for any value in columns ac-al
    ..Recalculate above using only these records for net commission.



    I hope that makes sence with the attached wb. Im trying to be quick as im rushing out. Would imagine this would be easier using formulas but I wouldn't know where to start. vba Im pretty sure I could do it, but dont think Id choose the right methods.

    Could somebody point me in the right direction?
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Hi
    Have you tried a pivot table?

    I'm assuming that each row contains records similar to row 3 and not what appears to be nonsense data in rows 4-6
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Quote Originally Posted by Richard Buttrey View Post
    Hi
    Have you tried a pivot table?

    I'm assuming that each row contains records similar to row 3 and not what appears to be nonsense data in rows 4-6

    Sorry about that I was rushing and didn't realise there was a filter active. The numbers were just used for me to test a userform.




    Honest answer Richard, I don't fully understand what a pivot table is! but thats my job to learn, if you think it would be a good approach Ill do some reading. Thank you

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Hi,

    See attached

    I added some additional rows in the data. Above the pivot table you can see the drop down that will allow you to select 4, 8, 12 or indeed any other number from column W.

    Pivot Tables are immensely powerful when you need to summarise and analyse data from a 2 dimensional database. Extremely easy to set up, just a few clicks. A little more effort needed to fully get to grips and the full functionality available from them but if you do persevere you'll use PTs to analyse data in ways you've not yet dreamed of.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    See attached

    I added some additional rows in the data. Above the pivot table you can see the drop down that will allow you to select 4, 8, 12 or indeed any other number from column W.

    Pivot Tables are immensely powerful when you need to summarise and analyse data from a 2 dimensional database. Extremely easy to set up, just a few clicks. A little more effort needed to fully get to grips and the full functionality available from them but if you do persevere you'll use PTs to analyse data in ways you've not yet dreamed of.
    Thank you very much, these will be very useful and seem easy to set up. Im assuming you can query a pivot table using vba and formula?

    I need a little more functionality (ie mark a column of filtered records etc) maybe a combination of formula and vba might be right. Ill create and upload a template of what Im trying to achieve soon.


    Thanks again

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Quote Originally Posted by excelloser View Post
    Thank you very much, these will be very useful and seem easy to set up. Im assuming you can query a pivot table using vba and formula?




    Thanks again
    Indeed you can but you need to be careful when writing VBA code since by their very nature pivot tables change their shape every time you perform a pivot or filter them.

    If you're looking for fixed management reports it may still be best to design a report and use Data Filter Advanced to create the report rows.

  7. #7
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    1212_2.xlsmI have created a template for what Im looking for. I could write vba for it but it would be pages and pages of finds and filters.

    Now I hope its a little more obvious what Im going for. Thank you for all the help Richard

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Hi,

    I've given you a starter for 10 with the attached.

    I wasn't sure which column was the Sales persons name but no doubt you can change as necessary. You'll need to decide the definition of a week to complete the deals / week.

    Anyhow see how you get on.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    I've given you a starter for 10 with the attached.

    I wasn't sure which column was the Sales persons name but no doubt you can change as necessary. You'll need to decide the definition of a week to complete the deals / week.

    Anyhow see how you get on.

    Exactly what i needed to get started nice one.. Ill report back soon

    Thanks again buddy

  10. #10
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    Im getting there. I have managed to duplicate what you have given me on the live document. I have to be honest however, I hit a brick wall as soon as I try to go a step further.

    I need to duplicate this formula
    =COUNTIFS(dates,">="&DATE($F$7,$A$6,1),dates,"<="&EOMONTH(DATE($F$7,$A$6,1),0),salesreps,$F$6)
    But only reference records with a value in either or both of the following columns AC AD

    Seeing how this would fit into this formula will help me understand how its constructed.

    Thanks again for the help

  11. #11
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: What is the best approach to a commission report.. vba/formula/chart/table?

    All sorted (named range set up wrong)... Got a nice report now exactly what I wanted, just need to write some vba to mark the records com paid and job done.


    Thanks for the help Richard, was exactly what i needed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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