Macro for selecting CTRL+SHIFT+DOWN

voice

New Member
Joined
Sep 15, 2011
Messages
2
I want to be able to replicate the CTRL+SHIFT+DOWN keypress, as part of a bigger macro project.

So far, the closest thing I can find is this:


Find the last used cell, before a blank in a Column:

Sub LastCellBeforeBlankInColumn()
Range("A1").End(xldown).Select
End Sub


Instead of just selecting the end cell of that column, I wanna be able to select from A1 TO that cell.

How?!

Thank you in advance!
 

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
Thank you! That worked perfect.
Now stuck renaming the highlighted section...

Sub Productrename()

Range(Range("AL2"), Range("AL2").End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="products", RefersToR1C1:= _
"='User List'!R2C38:R501C38"

End Sub

Cos the above code refers to an unchanging range of cells to rename, whereas I want it to only rename the selected cells from the first part of the code...

Is this getting implausible? :P
I'm guessing it's to do with the RefersTo part, but am unsure as to how to proceed.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,351
Members
452,907
Latest member
Roland Deschain

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