Pull data from last cell in a row

bmckenna

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

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Assuming you are looking for column A,

Try this formula:

=OFFSET(A1,COUNT(A:A)-1,0)
 
Upvote 0
Assuming you are looking for column A,

Try this formula:

=OFFSET(A1,COUNT(A:A)-1,0)

Make sure your data starts from Cell A1
 
Upvote 0
Well, this is what I did: =OFFSET(B28,COUNT(28:28)-1,0)

I want the last value in row 28, that starts at cell B28 and goes to the right. I just get #REF back when I do.
 
Upvote 0
Try:
=INDEX(2:2,,COUNTA(2:2))
This will work correctly only if none of the cells in the range are blank.
If that is not so, a longer formula to find the last non blank cell is required
 
Upvote 0
I need an excel formula, preferably no VBA, that finds the last value in a row range.

If the row range is text:

=LOOKUP(REPT("z",255),A2:Q2)

=LOOKUP(REPT("z",255),2:2)

If the row range is numeric:

=LOOKUP(9.99999999999999E+307,A2:Q2)

=LOOKUP(9.99999999999999E+307,2:2)
 
Upvote 0
If there ARE blank cells in the range then use one of the following:
1. Range has NUMBERS only
=INDEX(2:2,MATCH(9.999999E+306,2:2))

2. Range has TEXT only
=INDEX(2:2,,MATCH("*",2:2,-1))

3. MIXED range with both numbers and text
=INDEX(2:2,,IF(ISERROR(MATCH(9.999999E+306,2:2)),MATCH("*",2:2,-1), IF(ISERROR(MATCH("*",2:2,-1)),MATCH(9.999999E+306,2:2), MAX(MATCH(9.999999E+306,2:2),MATCH("*",2:2,-1)))))
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,220
Members
448,876
Latest member
Solitario

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