+ Reply to Thread
Results 1 to 15 of 15

how to make a matrix formula automatically update?

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    how to make a matrix formula automatically update?

    Hi there!
    I am not an advanced Excel user and I need your help for something: I am writing an excel worksheet that produces forecasts from given time series.
    The worksheet contains a matrix formula which produces the forecasts once the input time series and other parameters are given.
    I need a way to make this matrix-formula update and take a wider cell range whenever we update the input time series as more recent data become available...does something come to your mind?
    I somewhat have a feeling that I need to record a macro to do that but I don't know how!

    Any help will be much appreciated, thanks!!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    What is your matrix-formula?

  3. #3
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    It uses an add-in to produce ARMA estimates so the formula goes like: ={Arma(B6:B26;1;0;true)}
    and I would like it to automatically update if cells b27, b28, .... are available in the worksheet (i.e. they are non zero). Any clue?
    Thanks

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    Is there any other data in column B?
    Is ARMA an add in you have made? what is the code? What does the calculation do? Is it dependent on the number of cells in the range (i.e. would =ARMA(B6:B28,1,0,true) give the same result as = ARMA(B6:B26,1,0,true) if B27 and B28 where blank?

    You could possibly try something along the lines of:
    =ARMA(INDIRECT("B6:B" & MIN(IF(B6:B100="",101,ROW(B6:B100)))),1,0,true)

  5. #5
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    No the issue is that the value is definitely different for ARMA(B6:B28,1,0,true) and ARMA(B6:B26,1,0,true), and especially the add in does not tolerate blanks that's why this all mess is needed!
    The add in is not mine, it is the one available at http://www.web-reg.de/arma_addin.html
    Unfortunately I don't think the formula you suggested would work, it returns all #ND

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    Try this instead
    =ARMA(INDIRECT("B6:B" & MIN(IF(B6:B100="",ROW(B6:B100)-1,101))),1,0,TRUE).

  7. #7
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    No sorry, it doesn't work...can you tell me in words what the formula you typed should do?

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    it looks at cells b6:b100, if they are empty it gives them a value of the row they are located on -1. If they have a value it gives them a value of 101. It then finds the minimum of these numbers, which should be the last row with data (first empty row -1). It then makes a text string of "B6:B" & last row with data, and uses the indirect function to turn this into a useable reference.

    I tested that one to double check it was correct, are you entering it as an array formula?

  9. #9
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    Yes I am entering it as an array formula...the thing is that probably the add-in does not work with this as an argument (does it make sense?)
    Did u double check with the add-in too?

  10. #10
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    No I don't have the add-in.

    does this work:
    =SUM(INDIRECT("B6:B" & MIN(IF(B6:B100="",ROW(B6:B100)-1,101))))

  11. #11
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    yes it works...
    ok I know why I get the error, the indirect(...) thing returns #na for the cells where there is either 0 or a blank, and the arma add-in does not tolerate #na do you think I can modify the formula to overcome this?
    Thanks sooo much

  12. #12
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    Sorry, I'm a bit lost.

    This:
    ("B6:B" & MIN(IF(B6:B100="",ROW(B6:B100)-1,101)))
    Shoudl give you "B6:B16" where 16 would be your last cell with data.

    =INDIRECT("B6:B16") would then give you $B$6:$B$16 as a cell reference which you can use as a formula.
    If this works:
    =SUM(INDIRECT("B6:B" & MIN(IF(B6:B100="",ROW(B6:B100)-1,101))))
    then I don't know why ARMA() would not work with this arrangement, or the comment about returning N/A, unless you cannot use an array formula with the ARMA() arguement. In which case, you could set it up with two cells, one (lets say, for example, C1) with =("B6:B" & MIN(IF(B6:B100="",ROW(B6:B100)-1,101))) then in C2: = ARMA(Indirect(C1),1,0,true) would give you the correct answer hopefully.

  13. #13
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    ok I see what you are saying....
    then the problem is different, before entering the arma(...) formula I need always to specify a nx3 interval where n is the number of available data I have!
    of course when I enter your (brilliant) formula the add-in messes things up because the I give it a wider interval than it needs (auto-updating),
    the problem is that unfortunately I don't know n from the the beginning and I need to set it very wide !!
    That's a mess!! if you have an idea on how to solve this do let me know....infinite thanks

  14. #14
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: how to make a matrix formula automatically update?

    n is the number of cells with data in? either
    =MIN(IF(B6:B100="",ROW(B6:B100)-1,101))-6
    or if you have no other data in column B
    =COUNTA(B:B)

  15. #15
    Registered User
    Join Date
    11-13-2013
    Location
    Rome
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: how to make a matrix formula automatically update?

    yes!!! Thanks so much the counta(b:B) command works, I only need to select an initial cell range with nx3 where n is the maximum possible!!!

    you have been amazing yudlugar

+ 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. Replies: 1
    Last Post: 05-16-2013, 02:15 AM
  2. Can a formula update automatically ?
    By PW6780 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-29-2012, 02:55 PM
  3. Formula does not update automatically
    By Franziska in forum Excel General
    Replies: 4
    Last Post: 06-28-2010, 08:50 AM
  4. VLOOKUP Personal.xls - how to make values update automatically
    By maff in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-18-2008, 03:23 PM
  5. Can I set up the formula to update automatically?
    By pugsly8422 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2005, 01:06 PM

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