Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Is Range Between two Ranges

Kevin,

In the event below,

Not Intersect(Target,Range(rgeStart,rgeEnd)) Is Nothing

will return TRUE if the Target is between rgeStart and rgeEnd.

HTH,
Bernie
MS Excel MVP

"Kevin McCartney" wrote in
message ...
I'd like to find if the selected cell is between two ranges, does anyone

know the required code.

Private Sub xlApp_SheetSelectionChange(ByVal Sh As Object, ByVal Target As

Range)
Dim rgeStart As Range, rgeEnd As Range

Set rgeStart = Sh.Range("B15")
Set rgeEnd = Sh.Cells.SpecialCells(xlCellTypeLastCell)

End Sub

TIA
KM



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
Join non-contiguous ranges into one range via named range? ker_01 Excel Discussion (Misc queries) 3 May 1st 09 11:09 AM
x y scatter chart series ranges reset to x(range) = y(range) Brakerm19 Charts and Charting in Excel 4 September 26th 06 11:13 PM
How to replicate 1 range to muptiple ranges at once? Ann Excel Worksheet Functions 1 January 4th 06 08:07 PM
Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K jennifer Excel Worksheet Functions 1 August 11th 05 02:09 PM
SUM using Three ranges. Two Comparisons and the SUM Range czamora Excel Programming 1 July 19th 03 04:54 PM


All times are GMT +1. The time now is 03:15 PM.

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

About Us

"It's about Microsoft Excel"