Wrong End

Genlist

New Member
Joined
Mar 19, 2012
Messages
9
Have spreadsheet with over 14,000 rows and when using "Selection.End(xlDown).Select" the cursor stops at row 12,106 not matter which column I test. Why does it stop on that row instead of 14,054?:confused:
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows
Blank cell below it?
 

Genlist

New Member
Joined
Mar 19, 2012
Messages
9
No blank cell below it in any column tested. The columns I have tried on have data through Row 14106.
 

gaj104

Well-known Member
Joined
Nov 9, 2002
Messages
864
If you do it manually, i.e press ctrl+down on the selected cell, does it end up on 12,106?
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows

ADVERTISEMENT

Hidden row with a blank?

Do you get the same result in the UI?
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows

ADVERTISEMENT

User interface -- what gaj suggested.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,219
Office Version
  1. 365
Platform
  1. Windows
What happens when you come from the bottom up?
Code:
Cells(Rows.Count, Selection.Column).End(xlUp).Select
 

Genlist

New Member
Joined
Mar 19, 2012
Messages
9
That is crazy. When working from bottom (last row with date) nothing happens. When working for the top is goes to the last row with data. That seems kind of backwards. If I change the xlUp to xlDown starting from the top or the last data row cursor goes to last row of spreadsheet.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,219
Office Version
  1. 365
Platform
  1. Windows
Did you try the code I posted?
 

Watch MrExcel Video

Forum statistics

Threads
1,123,154
Messages
5,600,024
Members
414,356
Latest member
death20

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
Top