Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Range as array

Robert,

You can use the Match function to look directly in the cells. E.g.,

Dim Res As Variant
Res = Application.Match(123, Range("G1:G1000"), 0)
If IsError(Res) Then
MsgBox "not found"
Else
MsgBox "found"
End If



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



"Robert" wrote in message
...
I need to create a macro that will use a range G2:G1000 as
an array then check a cell value to find out if it is in
that array.

Any help is appreciated

Thank you in advance
Robert



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
operating over a range in an array ghengis_na'an Excel Discussion (Misc queries) 1 October 7th 09 06:27 PM
How to fix an array or range delboy Excel Discussion (Misc queries) 1 February 12th 08 08:14 PM
Array or range lookup per row? RG Excel Worksheet Functions 0 September 28th 07 04:54 AM
different formula for ROW, array / range? nastech Excel Discussion (Misc queries) 1 September 20th 07 10:34 PM
how to reverse a range/array? peter dmz Excel Worksheet Functions 5 August 11th 05 09:11 PM


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