+ Reply to Thread
Results 1 to 6 of 6

Convert Offset Formula into Non-Volatile (Index/Match)?

  1. #1
    Registered User
    Join Date
    08-02-2004
    Posts
    59

    Convert Offset Formula into Non-Volatile (Index/Match)?

    I'm trying to simplify a cumulative expense calculation for financial modeling into one cell instead of creating a full waterfall. After lots of googling, I pieced together something that works using this formula:

    =IF($R$3,SUM(OFFSET(O3,,,1,-MIN($R$3,COLUMNS($B$3:$P$3))))/$R$3,)

    - Row 3 = annual expense
    - Row 4: =IF($R$3,SUM(OFFSET(O3,,,1,-MIN($R$3,COLUMNS($B$3:$P$3))))/$R$3,), this calculates the cumulative expense for all previous years
    - R3 = # of years to lookback

    Workbook attached. To summarize: P4 needs to be the sum of the 20% (1/R3) of each of the previous R3 years of expense. So it will need to look-back from periods 10-14. And this lookback period is changed by the # of years. The current formula seems to work.

    But I understand Offset is a volatile function and my workbook has really slowed down since starting using it (I re-enter/re-calculate thousands of cells many times). Is there a way to adjust this using Index/Match or some other formula?

    It will need to handle changing the number of years in row R3
    And preferably have some error checking built-in as not every calculation will have the full 15 periods of data. If not available, it will need to start at the first period which is greater than the # of years in in R3.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Convert Offset Formula into Non-Volatile (Index/Match)?

    Try

    in C4

    =IF(C2>$R$3,B4+C3-INDEX($A$3:$P$3,,COLUMNS($A$4:C4)-$R$3),B4+C3)

    I also believe F5 value is wrong as only it effectively only adds 4 years A:E but A is not a value.

    Should the first result be in G5 (SUM(B3:F3)/R3) ????

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Convert Offset Formula into Non-Volatile (Index/Match)?

    why b4="" and c4=50
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Convert Offset Formula into Non-Volatile (Index/Match)?

    I did not understand the logic but hope the below formula will works
    b4=SUM(B3:INDEX($B3:B3,MEDIAN(COLUMNS($B3:B3),COLUMNS($B3:B3)-$R3+1,1)))-$B3
    c4=IF(COLUMNS($B5:B5)<$R3,"",INDEX($B3:B3,COLUMNS($B5:B5)-$R3+2))
    try the above and copy towards down

  5. #5
    Registered User
    Join Date
    08-02-2004
    Posts
    59

    Re: Convert Offset Formula into Non-Volatile (Index/Match)?

    My apologies, in my rush to extract the data from my actual spreadsheet, I made an error in the sample workbook and conflicted 2 different steps. Updated/correct one is attached (couldn't figure out how to edit the original post).

    I removed the formulas and hardcoded how the data would look, I need to have Row 4 do all of the math in rows 6-10 so that it matches row 11. It boils down to a SUM last X periods / X (thanks JohnTopley)...with the wrinkle that once the remaining # of periods is less than X, it needs to adjust to only sum the remaining periods.

    So essentially how can I sum the last X number of cells in a row, while adjusting for cases where the number of cells remaining is less than X?

    And avoiding volatile functions.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Convert Offset Formula into Non-Volatile (Index/Match)?

    For Depreciation (based on last file)

    in B4

    =IF(B$2<=$R$3,"",SUM(INDEX($B$3:$P$3,,COLUMNS($B$4:B$4)-$R$3):INDEX($B$3:$P$3,,COLUMN(A5)-1))/$R$3)

    copy across

+ 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] assistance to convert offset and match formula in vba code
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-02-2017, 10:00 AM
  2. [SOLVED] Convert Lookup to Index/Match - to be offset
    By Josephrandall in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2016, 10:51 AM
  3. [SOLVED] Offset formula with Index and Match
    By kbiro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2015, 11:37 AM
  4. Need help with index, match, offset formula
    By soonernut96 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2013, 09:16 PM
  5. Volatile formula with index/match dynamic range
    By asgersax in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-16-2013, 05:37 PM
  6. Index, Match, Offset Formula
    By rhudgins in forum Excel General
    Replies: 2
    Last Post: 06-30-2010, 08:10 AM
  7. Trying to replace Offset() with a non volatile formula
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2009, 02:09 PM

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