selecting cell : combination of column of active cell & last row

littlepete

Well-known Member
Joined
Mar 26, 2015
Messages
503
Office Version
  1. 365
Platform
  1. Windows
hello all :)

I'm trying to combine to things together :
i'm trying to go to the last row in the same column as the active cell ;

i'm also trying to achieve the opposite :
trying to go to the first row (under the titles) in the same column as the active cell ...

is not working : Range(ActiveCell.Column & Cells.Rows.Count).End(xlUp).Select
partially working (fixed column) : Range("B" & Cells.Rows.Count).End(xlUp).Select

there could be empty cells in the column, they need to be skipped...
not sure yet how to make the perfect combination :) thank you !!!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Use Cells instead of Range, where you can use the Column number (I think I may have helped you with something like this before):
VBA Code:
Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select
 
Upvote 0
Solution
reminder : if you have a filter working at that time and you use for example end(xlup), you get the last not-empty visible cell. for example at row 100, even if row101-200 are not empty but hidden because of the active filter. So if you use this method, the filter has to be disabled.
 
Upvote 0
Use Cells instead of Range, where you can use the Column number (I think I may have helped you with something like this before):
VBA Code:
Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select


thank you :) i adjusted all goto functions to stay within my list :) home - end - ctrl home & end
and show the first row(same col.) (with 6 as row number, and without the end.xldown/up) and show the last row (same col.)

so glad that worked !!!
have a nice evening :) !!!
 
Upvote 0

Forum statistics

Threads
1,214,517
Messages
6,119,984
Members
448,935
Latest member
ijat

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