Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
del del is offline
external usenet poster
 
Posts: 2
Default range of cells

how do you check if a cell falls under a a range of
cells. in other words, check if a cell is within a
particular range.
i tried using strcomp on the addresses but it didn't work.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default range of cells


if not intersect (Activecell,[b4:c11]) is nothing then
msgbox "gotcha!"
endif

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"del" wrote:

how do you check if a cell falls under a a range of
cells. in other words, check if a cell is within a
particular range.
i tried using strcomp on the addresses but it didn't work.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default range of cells

Del,

You can use the Intersect method to determine if a cell is in
another range of cells. E.g.,

Dim Rng As Range
Set Rng = Range("C3")
If Not Application.Intersect(Rng, Range("A1:D4")) Is Nothing Then
Debug.Print "In Range"
Else
Debug.Print "Out of range"
End If


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



"del" wrote in message
...
how do you check if a cell falls under a a range of
cells. in other words, check if a cell is within a
particular range.
i tried using strcomp on the addresses but it didn't work.



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
Summing a range of cells based on criteria in another range Jack Excel Worksheet Functions 2 November 5th 09 01:46 AM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 1 December 30th 05 09:32 PM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 2 December 30th 05 07:55 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM


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