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?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
does this do what you want?
Code:
=INDEX($AC$51:$AC$76,MATCH(99^99,$AC$51:$AC$76)-5+ROWS(AE$51:AE51))
 
Last edited:
Upvote 0
it does the same thing as my last code as if all the cells have the same letter it turns all 5 cells that have this code to #N/A
 
Upvote 0
Can you post a screenshot of your data? You could possibly do this with the INDIRECT & ROW functions.

Cheers,
Caleeco
 
Upvote 0
9
9
http://tinypic.com/r/rlkmkh/9

g4 to g8 is were it should show the last 5

<a href="http://tinypic.com?ref=rlkmkh" target="_blank"><img src="http://i64.tinypic.com/rlkmkh.png" border="0" alt="Image and video hosting by TinyPic"></a>
 
Upvote 0
Hello,

Thanks for the picture. I would do something like this:

Put this in cell G4 and copy down:
Code:
=INDIRECT("C" & COUNTA(C:C)+2-(ROW()-4))

2i10ejb.jpg


Cheers
Caleeco
 
Upvote 0
Thankyou! it works well, how would i edit this to read from a list in other cell line, for example 'AC' cell line?

You would just change the 'C's to all "AC's.
Code:
=INDIRECT("AC" & COUNTA(AC:AC)+2-(ROW()-4))

However, if you see in the equation. there are two other numbers in the equation! 2 & 4.

The first number is the number of blank rows you have above your data in column AC. the second number is the row number where your first entry in column AE needs to go. Let me know if you need help setting this up!

Caleeco
 
Last edited:
Upvote 0
i changed them however its just displaying '0's

<a href="http://tinypic.com?ref=a42343" target="_blank"><img src="http://i65.tinypic.com/a42343.png" border="0" alt="Image and video hosting by TinyPic"></a>
 
Upvote 0
So for your screenshot, the formula in AD52 would be
Code:
=INDIRECT("AC" & COUNTA(AC:AC)+51-(ROW()-52))

Let me know if that works
Cheers

Caleeco
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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