ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select columns of active cell's row (https://www.excelbanter.com/excel-programming/365623-select-columns-active-cells-row.html)

Cumberland[_5_]

Select columns of active cell's row
 

Hi!

Could anyone tell me how I can select columns A, B, C, and F of th
active cell's row?

Thanks

--
Cumberlan
-----------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...fo&userid=3344
View this thread: http://www.excelforum.com/showthread.php?threadid=55639


Chip Pearson

Select columns of active cell's row
 
Try

Dim Rng As Range
Set Rng = Application.Union(Cells(ActiveCell.Row, "A").Resize(,
3), _
Cells(ActiveCell.Row, "F"))
Rng.Select



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Cumberland"
wrote in
message
...

Hi!

Could anyone tell me how I can select columns A, B, C, and F of
the
active cell's row?

Thanks.


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile:
http://www.excelforum.com/member.php...o&userid=33445
View this thread:
http://www.excelforum.com/showthread...hreadid=556393




Cumberland[_6_]

Select columns of active cell's row
 

Thanks Chip, you're a genius

--
Cumberlan
-----------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...fo&userid=3344
View this thread: http://www.excelforum.com/showthread.php?threadid=55639


Chip Pearson

Select columns of active cell's row
 
I have my moments.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Cumberland"
wrote
in message
...

Thanks Chip, you're a genius!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile:
http://www.excelforum.com/member.php...o&userid=33445
View this thread:
http://www.excelforum.com/showthread...hreadid=556393





All times are GMT +1. The time now is 04:08 PM.

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