need formula to retrieve word value from last cell in column

chaos

Board Regular
Joined
Feb 24, 2003
Messages
119
Hi everyone,

I use the following formula to retrieve the number value in a cell that is in the last row of a column. Every day, a new number is added to the bottom of the column. I need the foumula to update dynamically, and this works find. Here is an example:

=INDEX(Data2!H:H,MATCH(BigNum,Data2!H:H)-0):INDEX(Data2!H:H,MATCH(BigNum,Data2!H:H)-0)

But I have another column with word values, rather than number values, that update in the same way, and this formula doesn't work. Could anyone tell me if there is a different formula available that will work with word values.

Many thanks in advance.

chaos
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi.

see the example:
Book5
ABCDE
1NumsTextLastNum18
21aLasttextm
32b
43r
5233d
62y
714vf
85e
97r
104hg
1122p
122d
132
14e
1518m
16
Sheet1


the text version is:

=INDEX(B:B,MATCH(REPT("Z",10),B:B,1),1)

paddy
 
Upvote 0
an afterthought:

=INDEX(Data2!H:H,MATCH(BigNum,Data2!H:H)-0):INDEX(Data2!H:H,MATCH(BigNum,Data2!H:H)-0)


I'm guessing that you originally used this formula to define a dynamic named range, and have modified it for the current task. You only need 1/2 the formula to do the "return last value" task:

1) as per the help file, index() "Returns a value or the reference to a value from within a table or range. ". In this case you only need the value, so no need for the longer formulation
2) whatever you're doing, the -0 bits are superfluous!

paddy
 
Upvote 0
Adding to Paddy's and Juan's contributions, if you need a single formula to pick the last tentry in column A regardless of whether it is text or numeric, you may want to try using the formula:

=INDEX(A:A,MAX(MATCH(9.99999999999999E+307,A:A),MATCH(REPT("z",255),A:A)))

see its application in the following simulation ...
y030503h1.xls
ABCD
1CellEntryLastCellEntryinColumnAregardless whetheritistextornumericm
21
3p
4g
5233
62
714
85
97
104
1122
122
132
14e
15m
Sheet7


I hope this helps. If I have misunderstood your question, please accept my apologies!
 
Upvote 0
'
easiest is

=LASTROW(B:B)

This works with numbers, text, or True/False

from Morefunc add-in.

see Add-ins information near top of list of messages
 
Upvote 0
Juan Pablo González said:
Use the same formula, but define

BigNum2

as

=REPT("z", 255)

and use BigNum2 instead of BigNum (And change the ranges....)


I'd suggest...

BigStr

instead. :lol:
 
Upvote 0
Re: need formula to retrieve word value from last cell in co

Hey guys,

I just noticed the additional postings. Thanks for the help.

Paddy, I see what you are saying about my tortured application of the Index formula. :oops: Everyday, I'm learning something new.

Regards,

chaos
 
Upvote 0

Forum statistics

Threads
1,223,319
Messages
6,171,427
Members
452,402
Latest member
siduslevis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top