+ Reply to Thread
Results 1 to 8 of 8

VBA code to allocate estimate revenues based on actual data

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    nyc
    MS-Off Ver
    M365 V2311
    Posts
    65

    VBA code to allocate estimate revenues based on actual data

    Hi Excel professionals,

    I wanted to automate my manual allocation of estimated revenues and can't seem to think of a way except to create a VBA which I don't have enough excel knowledge to do so. Please see attached worksheet, col "A" to "E" is my actual data. My esti revenus is from cell "H2 to J5" and my expected allocation results are from cell "H10 to L21".

    My current process is to create a pivot table and calculate how much each Agent's % based on total Company, State and Business code and apply that to the estimate revenue. This gets extremely long when the real actual data is over 900 rows.

    Note: I use fake data to generate this example so the actual data heading is not the same as the example I attached (for example: "Agent" is in the example, but my actual work has it as "producer")

    Please let me know if you can help.

    Thanks,
    yayayken
    Allocation of estimated sales with 4 variables.xlsx

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: VBA code to allocate estimate revenues based on actual data

    Is it are you looking for?
    Make sure you have following sheet:
    Data
    Output
    Please Login or Register  to view this content.
    Quang PT

  3. #3
    Registered User
    Join Date
    12-11-2013
    Location
    nyc
    MS-Off Ver
    M365 V2311
    Posts
    65

    Re: VBA code to allocate estimate revenues based on actual data

    Sorry, I should have mention that the estimate/accrual is on the 2nd tab and I want the spreading calculation done on the 3rd tab. I thought I could look at your code and change it myself but I overestimated myself. Please could you change the code so the result will be like the attached workbook.Allocation of estimated sales with 4 variables v2.xlsx


    I ran the code to my real dataset and an error message pop up:

    "Run-time error '11':
    Division by zero
    Last edited by yayayken; 03-08-2024 at 11:12 AM.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: VBA code to allocate estimate revenues based on actual data

    Just come back from weekend holiday, sorry for late reply.
    Try again:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-11-2013
    Location
    nyc
    MS-Off Ver
    M365 V2311
    Posts
    65

    Re: VBA code to allocate estimate revenues based on actual data

    Will it be too much trouble if I add another variable? Please see attached. I included a product column so the spreading will need to increase another variable. Please let me know if you can help. Thank you so much.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: VBA code to allocate estimate revenues based on actual data

    Sure.
    Try again

  7. #7
    Registered User
    Join Date
    12-11-2013
    Location
    nyc
    MS-Off Ver
    M365 V2311
    Posts
    65

    Re: VBA code to allocate estimate revenues based on actual data

    Yes this is great. I have one more scenario cause sometimes my department heads give me the products in the estimate so I can narrow down to spreading on those products only. Please see v4 worksheet and let me know if this is possible. This will cover all my scenarios of spreading and I'm really grateful for your help. Thank you so much.Allocation of estimated sales with 4 variables v4.xlsm

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: VBA code to allocate estimate revenues based on actual data

    Okay. Try again

+ 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. [SOLVED] Estimate extended data based on known information
    By ikench in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2023, 01:22 PM
  2. Formula to allocate revenues yearly
    By Myki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2017, 02:46 AM
  3. Compare with Actual Vs Estimate with Multiple combination critiria
    By Excel_Pa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2016, 11:24 AM
  4. Replies: 3
    Last Post: 10-18-2013, 01:19 AM
  5. Need to allocate budget on a per month basis vs actual
    By joshgumby87 in forum Excel General
    Replies: 7
    Last Post: 03-11-2013, 08:10 AM
  6. Compare estimate versus actual figure
    By SuzanneG in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2012, 05:00 AM
  7. Estimate/Actual Amount Compare, Match and Output
    By rka81 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-16-2009, 07:26 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