Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Selecting cells on active row

Hi,

Having used a macro to get the first cell on the row I need selected, how do
I then get it to select the range A:H or even the entire row? I can't do
xlright as there may be blanks in some columns.

Also, is there a way of getting the macro to select a cell with a specific
word in it? I've managed a work-around but it would be nicer to use more
specific, neat code

Thanks
merry_fay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Selecting cells on active row

Sub GetBlock()
Dim L As Long
L = ActiveCell.Row
Range("A" & L & ":H" & L).Select
End Sub

This will Select A thru H in the row with the ActiveCell.
--
Gary''s Student - gsnu200855


"merry_fay" wrote:

Hi,

Having used a macro to get the first cell on the row I need selected, how do
I then get it to select the range A:H or even the entire row? I can't do
xlright as there may be blanks in some columns.

Also, is there a way of getting the macro to select a cell with a specific
word in it? I've managed a work-around but it would be nicer to use more
specific, neat code

Thanks
merry_fay

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting/Highlighting active cells wnfisba Excel Discussion (Misc queries) 1 September 27th 06 04:24 PM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
Selecting active area of sheet cfspahn24 Excel Discussion (Misc queries) 4 April 17th 06 12:19 PM
Selecting Embedded charts in Active Sheets programmatically Barb Reinhardt Charts and Charting in Excel 5 January 15th 06 02:36 PM
Selecting an Excel tab, Delete Worksheet command is not active missyjes New Users to Excel 1 September 23rd 05 03:16 PM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"