Find data in last cell of a row

bmckenna

New Member
Joined
Oct 15, 2009
Messages
33
I need an excel formula, preferably no VBA, that finds the last cell's value in a ROW range.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Answer:

=INDEX(A:F,1,MATCH(LOOKUP(2,1/(1:1<>""),1:1),1:1,0))

Replace the "A:F" with your range of columns. And for the "1" following the "A:F" and all of the "1:1", replace them with the row number you want to search.
 
Upvote 0
Hi Blake,

I don't think your formula is quite exactly what you are after. Look what happens if you add more data after columns A thru F:
Excel Workbook
ABCDEFG
1ababvabroken
2
3
4your formula:#REF!
5formula as given in link:broken
6link formula, restricted to small range:a
Sheet1
Excel 2003
Cell Formulas
RangeFormula
C4=INDEX(A:F,1,MATCH(LOOKUP(2,1/(1:1<>""),1:1),1:1,0))
C5=LOOKUP(2,1/(1:1<>""),1:1)
C6=LOOKUP(2,1/(A1:F1<>""),A1:F1)


Even if you are not concerned with this possibility, your formula seems to be just doing extra work; I would suggest switching to the one in C6.

Tai
 
Upvote 0
Answer:

=INDEX(A:F,1,MATCH(LOOKUP(2,1/(1:1<>""),1:1),1:1,0))

Replace the "A:F" with your range of columns. And for the "1" following the "A:F" and all of the "1:1", replace them with the row number you want to search.

What is in A1:F1 - text or numbers?
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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