Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Active cell is within a specific range

I need to check to see if the activecell is within a
particular range. Lets say I want to see if the active
cell is within range "A1:F20". How do I do this?


Thanks
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Active cell is within a specific range

Todd,

Use the Intersect method. For example,

If Application.Intersect(ActiveCell,Range("A1:F20") Is Nothing
Then
' active cell not in range
Else
' active cell in range
End If


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



"Todd Huttenstine" wrote in
message ...
I need to check to see if the activecell is within a
particular range. Lets say I want to see if the active
cell is within range "A1:F20". How do I do this?


Thanks
Todd Huttenstine



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
Making a specific row number active from a cell entry Bilbo Baggs Excel Discussion (Misc queries) 15 May 24th 10 06:29 PM
to change the macros as per active cell and range pol Excel Discussion (Misc queries) 2 August 4th 09 01:19 PM
Show value from specific column based on location of active cell Spuds Glorious Spuds Excel Discussion (Misc queries) 1 November 5th 08 05:43 PM
use active cell to determine range Gizmo Excel Discussion (Misc queries) 2 March 31st 08 04:55 AM
Clearly seeing active cell in a range dsa Excel Discussion (Misc queries) 2 March 24th 08 03:22 PM


All times are GMT +1. The time now is 02:07 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"