Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Select range starting at active cell

I have a simple question but I can't find the answer by looking at the
questions already here.

How do I select a range that is 3 columns wide and 25 rows deep, starting
with the active cell and moving left, then down to define the range?

Thanks in advance.
--
Rick H
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,722
Default Select range starting at active cell

Range(Selection, ActiveCell.Offset(25, 3)).Select
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"standard_guy" wrote:

I have a simple question but I can't find the answer by looking at the
questions already here.

How do I select a range that is 3 columns wide and 25 rows deep, starting
with the active cell and moving left, then down to define the range?

Thanks in advance.
--
Rick H

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default Select range starting at active cell

Hi,
from the active cell hold the left button in your mouse and highlight the
range you need

"standard_guy" wrote:

I have a simple question but I can't find the answer by looking at the
questions already here.

How do I select a range that is 3 columns wide and 25 rows deep, starting
with the active cell and moving left, then down to define the range?

Thanks in advance.
--
Rick H

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Select range starting at active cell

Standard_guy-

The VBA code Luke M is correct except for one thing. Your post
mentions you want to move left from the active cell. Therefore,
change the 3 in Luke's code to a -3. Also, be warned, you will get an
error message if you process this line of code and the active cell is
in columns A, B, or C.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Select range starting at active cell

When using Offset, the count starts 1 cell from fhe current cell. To get
three cells wide and twentyfive deep you need two more columns and
twentyfour more rows.

Sub vert()
If Selection.Column 3 Then
Range(Selection, Selection.Offset(24, -2)).Select
End If
End Sub

"Know Enough to be Dangerous" wrote:

Standard_guy-

The VBA code Luke M is correct except for one thing. Your post
mentions you want to move left from the active cell. Therefore,
change the 3 in Luke's code to a -3. Also, be warned, you will get an
error message if you process this line of code and the active cell is
in columns A, B, or C.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Select range starting at active cell

Thank all y'all. I am sure that has been answered before but I couldn't find
it from the titles. Hopefully my thread title is clear enough that it helps
somebody else. I learn A LOT by looking at threads already here.

Best Regards,
--
Rick H


"JLGWhiz" wrote:

When using Offset, the count starts 1 cell from fhe current cell. To get
three cells wide and twentyfive deep you need two more columns and
twentyfour more rows.

Sub vert()
If Selection.Column 3 Then
Range(Selection, Selection.Offset(24, -2)).Select
End If
End Sub

"Know Enough to be Dangerous" wrote:

Standard_guy-

The VBA code Luke M is correct except for one thing. Your post
mentions you want to move left from the active cell. Therefore,
change the 3 in Luke's code to a -3. Also, be warned, you will get an
error message if you process this line of code and the active cell is
in columns A, B, or C.


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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
macro to select range from active cell range name string aelbob Excel Programming 2 July 14th 08 09:19 PM
Selection starting from active cell Ronald Dodge Excel Discussion (Misc queries) 3 October 10th 06 12:46 AM
Select a range of columns based on active cell Tom Ogilvy Excel Programming 0 November 10th 03 05:09 PM


All times are GMT +1. The time now is 09:10 PM.

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"