LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default IsError and Match function

Tom/Bob: I thank God for the both of you have both helped me out this day.
Take care and have a blessed rest of the day. GD

"Tom Ogilvy" wrote:

<LOL
Whether you said it or not, it was 6 minutes after I posted according to the
presentation I am looking at. So yes, I did overlook making that correction,
but I am well aware that Match doesn't take a string as the second argument.

--
Regards,
Tom Ogilvy


"Bob Phillips" wrote:

AS I said, this doesn't work

If IsError(Application.Match(sh.Range("B" & I), "ElginPartsRange", 0)) Then

You need the range object


If IsError(Application.Match(sh.Range("B" & I), Range("ElginPartsRange"),
0)) Then


--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"Tom Ogilvy" wrote in message
...
because you have the priod in front and there is no qualifier. Try

Dim sh as Worksheet
set sh = Activesheet

FinalRowText = sh.Range("A65536").End(xlUp).Row
With Sheets("Elgin Parts")
FinalRowElginParts = .Range("A65536").End(xlUp).Row
.Range("A2:A" & FinalRowElginParts).Name = "ElginPartsRange"
End With
For I = 2 To FinalRowText
If IsError(Application.Match(sh.Range("B" & I), "ElginPartsRange",
0)) Then
sh.Rows(I).Delete
End If
Next I

--
Regards,
Tom Ogilvy





"GDCross" wrote:

I need to have this code delete records of parts from a worksheet that

do not
match a parts list (in sheet "Elgin Parts"). However, I get the error
"invalid or unqualified reference" when I run this code. Why is the code
".Rows(I).Delete" a problem? Any answers? Thanks, GD

FinalRowText = Range("A65536").End(xlUp).Row
Sheets("Elgin Parts").Select
FinalRowElginParts = Range("A65536").End(xlUp).Row
Range("A2:A" & FinalRowElginParts).Name = "ElginPartsRange"

For I = 2 To FinalRowText
Range("A" & I).Select
If IsError(Application.Match("B" & I, "ElginPartsRange", 0)) Then
.Rows(I).Delete
End If
Next I




 
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
ISERROR function Gotroots Excel Worksheet Functions 2 January 6th 10 01:21 PM
IF ISERROR INDIRECT MATCH Formula Question??? grateful Excel Worksheet Functions 19 September 21st 09 03:01 AM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
IsError Function Markus Scheible[_2_] Excel Programming 8 January 26th 05 03:46 PM
IF(ISERROR(MATCH - need value where match was found Ed[_9_] Excel Programming 2 November 12th 03 09:02 PM


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