View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Loadmaster Loadmaster is offline
external usenet poster
 
Posts: 82
Default sum of last 3 figures in a column which also contain empty cel

This must be a tough formula to figure out with the new perameters i just
specified this morning.

"Ron Rosenfeld" wrote:

On Sun, 13 Jul 2008 13:14:02 -0700, Loadmaster
wrote:

I am looking to find the sum of all the last 3 figures in Column K (Note:
Column K contains empty cells between the figures). Also, I am looking for
the sum of all the last 12 figures in that same column (Column K).


In general, this **array-entered** formula:

=SUM(LOOKUP(LARGE(ISNUMBER(rng)*ROW(rng),{1,2,3}), ROW(rng),rng))

To **array-enter** a formula, hold down <ctrl<shift while hitting <enter. If
you did it correctly, Excel will place braces {...} around the formula.

For versions of Excel prior to 2007, rng cannot refer to the entire column. So
the largest rng would be K1:K65535.

In Excel 2007, rng could refer to the entire column K:K

For the top 12:

=SUM(LOOKUP(LARGE(ISNUMBER(rng)*ROW(rng),ROW(INDIR ECT("1:12"))),ROW(rng),rng))

also **array-entered** with <ctrl<shift<enter.
--ron