ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Range Selection (https://www.excelbanter.com/excel-programming/407770-macro-range-selection.html)

Roy A.[_2_]

Macro Range Selection
 
Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.

FSt1

Macro Range Selection
 
hi
range("A:C").select would select columns A through C but what is the
"current cursor row"?

regards
FSt1

"Roy A." wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


Mike H

Macro Range Selection
 
maybe

Union(ActiveCell.EntireRow, Range("A:C")).Select

Mike

"Roy A." wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


Mika Oukka[_2_]

Macro Range Selection
 
This one selects cells from A to C on activecells row:

Range(Cells(ActiveCell.Row, "A"), Cells(ActiveCell.Row, "C")).Select

Mika Oukka, IT-Consultant

"Roy A." wrote in message
...
Range("A16:C16").Select

I would like the above command to select columns A:C with the current
cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.




Dave Peterson

Macro Range Selection
 
I bet you meant

intersect(activecell.entirerow, range("a:c"))



Mike H wrote:

maybe

Union(ActiveCell.EntireRow, Range("A:C")).Select

Mike

"Roy A." wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


--

Dave Peterson

Dave Peterson

Macro Range Selection
 
One mo
activecell.entirerow.cells(1).resize(1,3).select




Roy A. wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


--

Dave Peterson

Mike H

Macro Range Selection
 
I did <g thanks

"Dave Peterson" wrote:

I bet you meant

intersect(activecell.entirerow, range("a:c"))



Mike H wrote:

maybe

Union(ActiveCell.EntireRow, Range("A:C")).Select

Mike

"Roy A." wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


--

Dave Peterson


Dave Peterson

Macro Range Selection
 
Another one:
activecell.entirerow.cells(1).range("a1:C1").selec t
or
activecell.entirerow.range("a1:C1").select

(I kind of like the documentation that .cells(1) provides.)


Dave Peterson wrote:

One mo
activecell.entirerow.cells(1).resize(1,3).select

Roy A. wrote:

Range("A16:C16").Select

I would like the above command to select columns A:C with the current cursor
row.

Obviously a Macro newbee, lol Thanks for any assistance.


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 02:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com