Find last cell in a sheet

Eldrod

Board Regular
Joined
Mar 11, 2010
Messages
76
I'm sure this is subjective, but what is the best (ie. fastest operating) way to locate the last cell in a spreadsheet? I have a macro that needs to scan all the used cells in a sheet by creating a named range that covers all the used cells.
Right now my code uses the Usedrange.Columns.Count, but I'm finding that it frequently ends up dozens of cells past where actual data is coded, sometimes all the way to col IV.
I've seen the solutions selecting a cell all the way at the end and doing a xlLeft, but these are usually per row. I need to know at what cell is the intersection of the last row and column.
Anybody have a better way?
Thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I don't know if this will bump this year-old post back up the list but the links to the solution for this question no longer work...and this is precisely something i need to do, i.e., find the last cell in a sheet that contains data.

I tried searching other posts without luck...can find the last row...but looking to find the last cell.

Can anyone help? Thx. Wayne

Excel 2007
 
Upvote 0
I feel foolish. I think I ended my search a tad too early. The below fuction seems to do the trick...I just can't remember which thread I found it in now. I'm sorry to the author...the credit isn't mine.

ActiveCell.SpecialCells(xlLastCell).Select

Sorry to have bothered folks...regards...Wayne
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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