Ask Your Question

Find value in last cell in column

asked 2020-09-16 11:31:19 +0200

GrahamLees gravatar image

updated 2020-09-16 11:34:36 +0200

In the below table (part of a greater sheet) I have a table of ECB monthly EUR/GBP closing rates. The two blanks are in respect of two additional occasions in a 28 day cycle and contain no data and are thus disregarded. The array in the example comprises cells in the range X4:X17.

image description

What I am seeking to do in another cell, is enter the most recent rate (in the example given 0.89605).

Currently, I just re-enter the data (overwriting what is already there in the reference cell) but I am certain there is a simple formula to achieve this objective.

I have tried VLOOKUP(), COUNTIFS(), INDEX() in various forms but with no success.

I'm certain there is a simple solution to this but just now, it evades me.

Can anyone propose a suitable, simple solution to return the value in the last occupied cell in a column of 14 data elements?

edit retag flag offensive close merge delete




JohnSUN gravatar imageJohnSUN ( 2020-09-16 11:51:53 +0200 )edit

Not sure how that works but it returns a value of 23154.74. How does that relate to 0.89605 (the expected result)?

GrahamLees gravatar imageGrahamLees ( 2020-09-16 13:24:22 +0200 )edit

... then far below your cell with value 0.89605 there is another cell having value 23154.74. The formula is a full replacement for my second formula and according to your comment to my answer adaption to =INDIRECT("X"&SUMPRODUCT(MAX(NOT(ISBLANK(X4:X17))*ROW(X4:X17)))) will produce the same result.

Opaque gravatar imageOpaque ( 2020-09-16 13:48:10 +0200 )edit

You're right! Hadn't noticed that. Amended to your new version and that works. Thanks.

GrahamLees gravatar imageGrahamLees ( 2020-09-16 14:02:22 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-09-16 11:55:44 +0200

Opaque gravatar image

updated 2020-09-16 12:37:25 +0200


try the following formula:

=OFFSET($X$1;SUMPRODUCT(MAX((X1:X1000<>"")*(ROW(X1:X1000))))-1;0;1;1), where you may need to adapt 1000 in X1000 to the real maximum number to appear in your sheet. You may also use:

=OFFSET($X$1;SUMPRODUCT(MAX((X:X<>"")*(ROW(X:X))))-1;0;1;1), but since this involves whole columns it may cause performance problems (if something doesn't work as it should), hence I generally try to avoid this.

Hope that helps.

edit flag offensive delete link more


Thanks - the first example works perfectly when adjusted to within the range X4 to X17

GrahamLees gravatar imageGrahamLees ( 2020-09-16 13:33:57 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-09-16 11:31:19 +0200

Seen: 287 times

Last updated: Sep 16 '20