Try
=INDEX(H5:H25,MATCH(0,H5:H25,0)-1)
If H5:H7 have non-zero values, and H8:H25 are zero, the MATCH function will
return 4, ie the 4th cell in the range is the first cell with zero, the INDEX
function then returns the value in the 3rd cell (i.e. 4 - 1) in its range
argument, which at present is H7.
BrianH
"starguy" wrote:
>
> these both formulas work, but these dont ignore cells with nill values.
> infact i have sum formula in this range which totals the rows at left
> of this range.
> it means that cell H5 has formula =sum(B5:G5) and so on.
> i want to ignore the nill value and want formula to return the last non
> empty cell in this range.
>
> thanks for replying
>
> Biff Wrote:
> > Hi!
> >
> > > range may have nill value
> >
> > Is that a formula blank - "" ?
> >
> > Try one of these:
> >
> > =LOOKUP(9.99999999999999E+307,H5:H25)
> >
> > =LOOKUP(MAX(H5:H25)+1,H5:H25)
> >
> > Biff
> >
> > "starguy" <[email protected]> wrote
> > in
> > message news:[email protected]...
> > >
> > > i have row totals in a range that is H5:H25, but some cells in this
> > > range may have nill value (despite that formula exists). i want to
> > show
> > > the last value in this range in cell H27.
> > > suppose i have a value in H5, H6, and H7 (remaining cells i-e H8:H25
> > > have nill value) i want to show in H27 the last value in that range
> > > which is now in H7.
> > > similarly if the values in range H5:H25 change the cell H7 should
> > > automatically update to the last value appearing in H5:H25.
> > >
> > > is there any way?
> > > your expert advice will be appreciated.
> > > i m waiting for quick reply.
> > > thanks.
> > >
> > >
> > > --
> > > starguy
> > >
> > ------------------------------------------------------------------------
> > > starguy's Profile:
> > > http://www.excelforum.com/member.php...o&userid=32434
> > > View this thread:
> > http://www.excelforum.com/showthread...hreadid=525995
> > >
>
>
> --
> starguy
> ------------------------------------------------------------------------
> starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
> View this thread: http://www.excelforum.com/showthread...hreadid=525995
>
>
Bookmarks