Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet function match - run time error | Excel Worksheet Functions | |||
Error Handling with a Match Function. | Excel Programming | |||
Match Function - no room for error | Excel Worksheet Functions | |||
Error Return Value from and INDEX(A:2,MATCH()) function | Excel Worksheet Functions | |||
Match function, N/A error, how do I get around it? | Excel Programming |