View Single Post
 
Old 09-04-2016, 05:25 PM
Dave T Dave T is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default

Hello NoSparks and p45cal,

I really appreciate both of your replies and sorry for not replying sooner.

I decided to take the kids climbing for a couple of days. Thursday night we left Adelaide for a quick drive to Mount Arapiles (one of the best cliffs in Australia that is in Victoria) and only got back late Sunday night.

I did find some examples that selected a row from cell A to K, but could not work out how to get this to work on more than one row.

Code:
 
Sub SelectRow()
'http://stackoverflow.com/questions/16394036/select-column-1-to-10-of-activecell-row-in-excel

Range("A" & ActiveCell.Row).Resize(1, 11).Select
'OR
ActiveSheet.Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 11)).Select
'OR
Range("A" & ActiveCell.Row & ":K" & ActiveCell.Row).Select

End Sub
I did not want to be restricted to a fixed range as my example showed (maybe my question was poorly worded) and what p45cal provided suited my needs perfectly. Both of his examples are good but technically the 'blah2' option where cell selection between the two columns is required is the best.

Thanks again to both of you for your responses.

Regards,
Dave T

Last edited by Dave T; 09-05-2016 at 07:02 AM.
Reply With Quote