Get value of nth last cell in range (may have blanks)

Steven101

Board Regular
Joined
Oct 27, 2014
Messages
62
Hi, I have a range (G3:Z3) where the cells will always be filled starting from column G. I have been able to get the last completed cell in range using;

=INDEX(G3:Z3,MATCH(9.99999999999999E+307,G3:Z3))

what I'm looking for is the 2nd last, 3rd last completed cell in the range.

Is this possible?

Thanks, Steven
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
This seems to work fine:

=INDEX(G3:Z3,LARGE(INDEX(((G3:Z3<>"")*(COLUMN(G3:Z3))-COLUMN($G$3)+1),0),2))

The 2 at the end means it picks up the 2nd last.
 
Upvote 0
Excel 2010
EFGHIJKLMNOPQRSTUVWXYZ
312356789101112131415171820
4
5last20
62nd to last18
73rd to last17
815
914
1013
1112
1211
1310
149
158
167
176
185
193
202
211
22
23
24

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet1

Copy the formula down to get the 2nd, 3rd.... to last
Array Formulas
CellFormula
F5{=IF(ROWS($F$5:F5)>COUNTA($G$3:$Z$3),"",INDEX($G$3:$Z$3,LARGE(IF($G$3:$Z$3<>"",COLUMN($G$3:$Z$3)-COLUMN($G$3)+1),ROWS($F$5:F5))))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,915
Members
449,478
Latest member
Davenil

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