How do i get the last 5 cells out of a column

dannyi21i

New Member
Joined
Feb 25, 2018
Messages
17
in my work sheet i want to get the last 5 cells of a column and display them in 5 other cells.

i used the formula below and dragged it down 5 to show the last 5 cells and it worked to an extent but if the last 5 cells are all the same it messes up and doesnt show the last 5 cells;

=INDEX(AC51:AC76,MATCH(99^99,AC51:AC76,1)-1)

please can anyone help me?
 
still coming up with '0'

i thought it woud have the code below but it comes up with '0' on that aswell.

=INDIRECT("AC" & COUNTA(AC:AC)+29-(ROW()-52))
 
Last edited:
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
9
9
http://tinypic.com/r/rlkmkh/9

g4 to g8 is were it should show the last 5




G4: =INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)


Excel 2013/2016
ABCDEFGH
1
2
3letter
4te
5br
6at
7nn
8nn
9t
10r
11e
Sheet1
 
Upvote 0
G4: =INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)

Excel 2013/2016
ABCDEFGH
1
2
3letter
4te
5br
6at
7nn
8nn
9t
10r
11e

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

that just comes back with true and false
 
Upvote 0
that just comes back with true and false

you dont have to input the formula G4=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)

I meant that in the cell G4, you input the formula=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)
 
Last edited:
Upvote 0
It doesn't for me, it returns...

Sheet1

ABCDEFG
3 letter
4 t e
5 b r
6 a t
7 n n
8 n n
9 t a
10 r b
11 e t

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
G4=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)
G5=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G5)+1)
G6=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G6)+1)
G7=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G7)+1)
G8=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G8)+1)
G9=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G9)+1)
G10=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G10)+1)
G11=INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G11)+1)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


i have adapted this to the way i want it and it works perfectly so far, thankyou so much!
 
Upvote 0
Hi dannyi21i,
give this formula a try
=INDEX($C$4:$C$11,LARGE(ROW($C$4:$C$11)-ROW($C$3),ROW(A1)))
It must be entered with CTRL SHIFT ENTER and then drag it down.

hth
 
Last edited:
Upvote 0
G4: =INDEX($C$3:$C$11,MATCH(REPT("Z",255),$C$3:$C$11)-ROWS(G$4:G4)+1)

Excel 2013/2016
ABCDEFGH
1
2
3letter
4te
5br
6at
7nn
8nn
9t
10r
11e

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1


thanks mate this code helped me out so much been trying to figure the code i need for weeks.
 
Upvote 0
Hi dannyi21i,
give this formula a try
=INDEX($C$4:$C$11,LARGE(ROW($C$4:$C$11)-ROW($C$3),ROW(A1)))
It must be entered with CTRL SHIFT ENTER and then drag it down.

hth


this code just came back with '0's mate but i found the code i need from someone else who commented above, thankyou for your efforts though.
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,890
Members
449,477
Latest member
panjongshing

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