+ Reply to Thread
Results 1 to 6 of 6

How to find the last number in a variable length column.

  1. #1
    Registered User
    Join Date
    01-16-2017
    Location
    Wakefield England
    MS-Off Ver
    2016
    Posts
    2

    How to find the last number in a variable length column.

    I am recording a running total of my bank balance. Col 1 money in, col 2 money out, col 3 running total. As I enter each transaction the column gets longer but I would like to see the running total at the top of the spread sheet instead of scrolling down.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to find the last number in a variable length column.

    so you place the runnig total @ top


    Cheers
    Leo

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to find the last number in a variable length column.

    This will return the last (bottom-most) numeric value from column C:

    =LOOKUP(1E100,C:C)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,666

    Re: How to find the last number in a variable length column.

    Put the Totals row at the top and use dynamic named ranges in the formulas to auto-adjust for column height.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    01-16-2017
    Location
    Wakefield England
    MS-Off Ver
    2016
    Posts
    2

    Re: How to find the last number in a variable length column.

    Many thanks Biff-nice and simple. Could you explain how it works?

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to find the last number in a variable length column.

    The way LOOKUP works is...

    If *every* value in the range is less than the lookup_value (1E100) then the
    formula returns the *last* value in the range that is less than the
    lookup_value.

    To make sure that we do in fact get the last value we use a lookup_value
    that is guaranteed to be greater than any value in the range. So, we use an
    arbitrary HUGE number for the lookup_value.

    1E100 is a HUGE number. It's 1 followed by 100 zeros. Chances are pretty
    good that you don't have any numbers that big in your range so the formula
    returns the desired result, the last number in the range.

    Technically, all you really need for a lookup_value is a number greater than
    any number in your range. Consider this, say you were working with bowling
    scores. The highest possible bowling score is 300 so no number in your range
    will be greater than 300. So, in that case a lookup_value of 301 is all that
    is needed.

    When people post these types of questions they ususally don't tell us how
    big the numbers are that they're dealing with so when we reply, to be on the
    safe side, we use a HUGE lookup_value.

+ 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] Find a certain letter in the middle of a variable length text field
    By JET2011 in forum Excel General
    Replies: 3
    Last Post: 03-10-2015, 08:04 AM
  2. [SOLVED] Find the first empty cell from any of a group of variable length rows
    By j_Southern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2014, 05:47 PM
  3. Counting the number of occurances of a word in a column of variable length
    By midoop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2013, 10:58 AM
  4. Replies: 6
    Last Post: 04-14-2012, 04:07 AM
  5. how to find the column number in vba to use as a variable
    By KORT in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 11-19-2010, 04:22 PM
  6. [SOLVED] Find/Copy Variable length range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2006, 03:55 PM
  7. Sum a column of variable length?
    By Brian in forum Excel General
    Replies: 5
    Last Post: 02-03-2005, 11:06 AM

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