Consulting

Results 1 to 7 of 7

Thread: Balance Forward Method

  1. #1
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location

    Balance Forward Method

    Suppose I have my running checkbook balance in column D.
    I may continue to add additional rows...

    Suppose over in H1, I want to always be able to see that running balance.
    How can I always get H1 (for instance) to show me the last value in column D?
    ~Anne Troy

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    =INDEX(D:D,MATCH(9.99999999999999E+307,D:D,TRUE))

  3. #3
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Egads, that's ugly. Thanks!!
    ~Anne Troy

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Perhaps you would prefer a purtier vba solution?


    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim n               As Long
    n = Range("D65536").End(xlUp).Row
        Range("H1").Value = Range("D" & n).Value
    End Sub

  5. #5
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Nope. Client says it works terrific.
    ~Anne Troy

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    If you don't want ugly here is an array formula

    =INDEX(D1:1000,MAX(ROW(INDIRECT("D1:1000"))*(D1:AD1000<>"")))
    Although maybe not applicable in this case, this formula, unlike Aladin's is not numeric constrained
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Quote Originally Posted by Dreamboat
    Nope. Client says it works terrific.
    Glad to help.

    Take Care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •