Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If Error condition with Match Function


Hi, Can do the match function, but need a condition so that if there i
an
error returns 0, with below not returning anything (I have 'On erro
Resume Next' at top of code)

Cells(2, 10) = WorksheetFunction.Match(Cells(2, 9), Range(Cells(2, 8)
Cells(10, 8)), 0

--
T De Villier
-----------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...fo&userid=2647
View this thread: http://www.excelforum.com/showthread.php?threadid=56659

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default If Error condition with Match Function

On Error Resume Next
iRow = Application.Match(Cells(2, 9).Value, Range(Cells(2, 8),Cells(10, 8)),
0)
On Error Goto 0
If iRow 0 Then Cells(2, 10).Value = iRow

--
HTH

Bob Phillips

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

"T De Villiers"
wrote in message
news:T.De.Villiers.2bt7xj_1154349202.1579@excelfor um-nospam.com...

Hi, Can do the match function, but need a condition so that if there is
an
error returns 0, with below not returning anything (I have 'On error
Resume Next' at top of code)

Cells(2, 10) = WorksheetFunction.Match(Cells(2, 9), Range(Cells(2, 8),
Cells(10, 8)), 0)


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile:

http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566593



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If Error condition with Match Function


Thanks Bob


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566593

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
Worksheet function match - run time error Sajit Excel Worksheet Functions 3 July 8th 07 10:30 PM
Error Handling with a Match Function. Hari Prasadh Excel Programming 5 February 2nd 05 04:11 PM
Match Function - no room for error Dee Veloper Excel Worksheet Functions 0 January 28th 05 11:58 PM
Error Return Value from and INDEX(A:2,MATCH()) function BJ Excel Worksheet Functions 4 January 26th 05 02:59 PM
Match function, N/A error, how do I get around it? KR Excel Programming 3 January 21st 05 03:46 AM


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