+ Reply to Thread
Results 1 to 7 of 7

excel is forgetting the values of formulas???

Hybrid View

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    22

    Post excel is forgetting the values of formulas???

    Hi!

    I got an issue with my file of excel :/

    I got a big file. One sheet where all the calculus are done (with some personal functions), and the others sheets link to this worksheet to display the values we want.

    my issue is that each time i make a change in my file, the values that are calculated by one of my formulas just become "#values", even if i change a cell which isn't linked to the cells with my formula :/

    what can be the problem? is excel releasing memory?? :/ because i have to perform a forced calculation (by pressing CTRL + ALT + F9) on the right sheet! each time i do a modification :/

    thank's in advance

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: excel is forgetting the values of formulas???

    what formula does it happen to,or should we guess?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: excel is forgetting the values of formulas???

    are you sure you have the option for calculation on Automatic?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: excel is forgetting the values of formulas???

    make sure you have your calculation set to automatic
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: excel is forgetting the values of formulas???

    yes calculatio nis set to automatic!

    for the function, here it is :

    Function LIVRAISONS(date_debut As Range, lignes As Range, type_cam As Range, dates_livr As Range) As Double
    
    Dim tabl() As String
    Dim i As Integer
    Dim rng As Range
    Dim result As Double
    
    result = 0
    tabl = Split(lignes, "/")
    Set rng = Range(tabl(0))
    
    If UBound(tabl) >= 1 Then
        For i = 1 To UBound(tabl)
            Set rng = Application.Union(rng, Range(tabl(i)))
        Next i
    End If
    
    For Each c In Intersect(rng, type_cam)
    If Not (c.Value = "" Or c.Value = 0) Then
        For Each cell In Intersect(Rows(c.Row), dates_livr)
            If Not (cell.Value = "" Or cell.Value = 0) = True And date_debut <= cell.Value And date_debut + 6 >= cell.Value Then
                result = result + c.Value
            End If
        Next cell
    End If
    Next c
    LIVRAISONS = result
    End Function
    date_debut contains a date
    lignes contains a string like that :
    173:173,196:196,209:209,212:212,214:214/237:237,250:250,253:253,255:255,278:278,291:291,294:294,296:296
    type_cam is a range of cells in column (an entire column) cotainning integers
    dates_livr is a range of cells (multiple rows and columns) containing dates

    if you have any question, go for it, i know my function is dirty coded :/ and in french so it doesn't help to find the problem for you

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: excel is forgetting the values of formulas???

    your function is at fault. it refers to Range and Rows which refer to the active sheet at the time the calculation occurs, not necessarily the sheet where the function is used or where its argument ranges are located. you should really pass all necessary ranges as ranges if you can.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: excel is forgetting the values of formulas???

    see ,this is what happens if you supply the correct information! JosephP was able to answer it!

+ 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