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: 39
Default Selection in data range

I have a data range called AssayDescList that is imported from a database in
column C. How can I programatically check if the ActiveCell is placed within
that data range?

Here is what I came up with so far:

Sub AssayListInsert()
Dim Row As Integer, Cell As Range, AssayDescList As Name
Row = 7
Do While Not Range("B" & Row) = ""
Row = Row + 1
Loop
For Each Cell In Range(AssayDescList)
If Cell.Address = ActiveCell.Address Then
Range("B" & Row).Value = Left(ActiveCell, 4)
Exit Sub
End If
Next
End Sub

Can anyone help me correct this or even suggest an easier way?

Thanks
The Doctor

 
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
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
re-selection of Chart data range using keyboard David Excel Worksheet Functions 0 June 15th 05 10:08 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM


All times are GMT +1. The time now is 12:17 AM.

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"