LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Unable to get Match property of worksheetfunction

set rng = Range("M1:M200")(res)

I wasn't familiar with the use of (res) as above. Interesting.

Thanks for the ideas.
--
Kevin Vaughn


"Tom Ogilvy" wrote:

You can still use it.

You could test first if the value is lower than the lowest value and act
according, but if it isn't then use match.

Dim res as Variant
for each cell in Range("A1:A10")
if cell.value < Range("M1") then
' lower than
else
res = Application.Match(cell.Value, Range("M1:M200"),1)
set rng = Range("M1:M200")(res)
rng.select
end if
Next


Or you could just use Match and trap for the value.

Dim res as Variant
for each cell in Range("A1:A10")
res = Application.Match(cell.Value, Range("M1:M200"),1)
if iserror(res) then
' match raised an error
else
set rng = Range("M1:M200")(res)
rng.select
end if
Next

--
Regards,
Tom Ogilvy



 
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
"Unable to get the VLookup property of the WorksheetFunction class Ayo Excel Discussion (Misc queries) 4 August 6th 08 10:00 PM
Unable to match property error papou[_2_] Excel Discussion (Misc queries) 0 October 4th 07 10:07 AM
"Unable to get the NormSInv property of the WorksheetFunction clas David Roodman Excel Worksheet Functions 1 December 15th 04 12:15 PM
Unable to get the Text property of the WorksheetFunction class John[_86_] Excel Programming 5 November 25th 04 01:40 AM
Unable to get the Vlookup Property of the WorkSheetFunction Class monagan Excel Programming 2 August 3rd 04 09:32 PM


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