+ Reply to Thread
Results 1 to 4 of 4

Spend Actuals vs Forecast vs Plan

  1. #1
    Registered User
    Join Date
    09-09-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    4

    Lightbulb Spend Actuals vs Forecast vs Plan

    Hello Experts,

    I have 3 data sources for cost- Actual, Plan and Forecast. These three data sources are on separate sheets within the same workbook. Length of the columns in all these three sheets are the same. Column A contains the business unit code, Column B contains Cost pool name. The remaining columns contain periodic cost data.

    The requirement is -
    1. I need to make separate sheets for separate business units, with values from the aforementioned three data sources.
    2. The VBA code should be able to input the cost data based on "Row 5". If it is "OpEx Actual", then it should refer OpEx Actual tab, etc.

    I have tried to put index match match function, as a work around. But I think this can be streamlined and simplified using VBA. Especially when the number of business units increase in my data set.

    Can any of you please help ?

    Thanks
    Avishek
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: Spend Actuals vs Forecast vs Plan

    Why not just make ONE sheet with all business units listed. Then use VLOOKUP or INDEX/MATCH to get the relevant data from each of the sheets. Then you can use an AutoFiter or, maybe better, a Pivot Table to filter the data as required. Separate sheets will be difficult to manage (and create/maintain).
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-09-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    4

    Re: Spend Actuals vs Forecast vs Plan

    Hello,

    The requirement is that I create separate sheets for separate business units. I am trying to break the problem into two parts, so that it is easier for me.
    1. Adding a vba to create new sheets as per the business unit codes. So for example, if I have 10 business units, vba wil create 10 new sheets with the BU names as sheet name.
    2. Adding index match match formula on each sheet to get data from the three source files.

    I have already recorded this macro to achieve point#2.

    Range("D9").Select
    ActiveCell.FormulaR1C1 = _
    "=INDEX('OpEx Actual'!R8C4:R65536C20,MATCH('New tab1'!RC1,'OpEx Actual'!R8C1:R65536C1,0),MATCH('New tab1'!R6C,'OpEx Actual'!R3C4:R3C20,0))/1000"
    Range("D9").Select
    Selection.AutoFill Destination:=Range("D9:D17"), Type:=xlFillValues
    Range("D9:D17").Select
    ActiveWorkbook.Save

    But the problem is that I do not know how to replicate this code for all the tabs for 10 business units. Because I have hardcoded the sheet reference to 'New Tab1'. How do I ask excel to change this reference to the new tabs as and when these new tabs are created ?

    Thanks
    Avi
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: Spend Actuals vs Forecast vs Plan

    For part 2, try (untested):
    Please Login or Register  to view this content.

+ 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. Format pivot chart trendline, Actuals vs forecast
    By Anil K Goel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-30-2017, 11:50 AM
  2. Overlapping bar chart (forecast vs. actuals)
    By D-smoke in forum Excel Charting & Pivots
    Replies: 16
    Last Post: 09-16-2015, 09:52 AM
  3. Pivot Table - Forecast at completion based on actuals to date
    By ramgouda in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-27-2014, 04:37 PM
  4. Formula for Rolling FTE Forecast based on Historical Actuals
    By dash11 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-27-2013, 01:36 PM
  5. Replies: 0
    Last Post: 08-08-2011, 05:11 AM
  6. combination of actuals plus forecast graph
    By mmcknight in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-05-2007, 03:50 PM
  7. [SOLVED] to compare sales plan vs actuals from two different worksheets?
    By Prabhu Gowda in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-24-2006, 08:00 AM

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