LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Intersect check range

I am using a Worksheet_event according to instructions from another thread to
place a formula next to a user changed cell.

If Not Intersect(Target, Me.Range("B3:B65536")) Is Nothing Then ...

I wanted to change the above formula to use the current last row instead of
65536. Although the statement below is correct in calculating the last row,
using End(xlUp) obviously messes things up and "Target" changes, resulting in
erroneous results.

If Not Intersect(Target, Me.Range("B3:B" & (Cells(Rows.Count,
"B").End(xlUp).Row))) Is Nothing Then ...

Is it possible to fix this situation? My best solution would be not to
process up to the last worksheet row but only column "B" of range "MyRange".
Any cells outside "MyRange" should be processed by other code, if at all.
 
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
intersect named range in different workbook Jason[_9_] Excel Discussion (Misc queries) 2 October 17th 07 09:43 PM
Combine Intersect Range in If statements Ben Dummar Excel Discussion (Misc queries) 5 March 22nd 07 10:37 PM
Check if a range is a sebset of another range Bob Phillips[_6_] Excel Programming 0 May 6th 04 04:12 PM
Is there a "Non-Intersect" VBA method to remove a sub-range from a range? brettdj Excel Programming 1 December 11th 03 06:13 AM
Help with If Not Intersect derek Excel Programming 6 July 11th 03 04:39 PM


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