LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Match problem

Hi
The following code is misbehaving and throwing up an error 1004.
************
Sub match_add()
Dim v1 As Date, r1 As Range, m1 As Variant


v1 = Sheets("Sheet1").Range("d1").Value
Set r1 = Sheets("Sheet2").Range("a3:a18")
m1 = Application.Match(v1, r1, 0)
MsgBox m1

End Sub
*************
The value in cell d1 on Sheet1 is 5/1/06. And the values on Sheet2
Range('a3:a18") a
1/1/06
2/1/06
3/1/06
4/1/06
4/1/06
5/1/06
5/1/06
5/1/06
6/1/06
7/1/06
8/1/06
9/1/06
10/1/06
12/1/06
13/1/06
14/1/06
which certainly includes the value contained in cell d1. The match
function in excel gives the correct result -- so its not a case of a
missing value. I'm stumped!!! Please help.

Utkarsh

 
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
MATCH problem Jan Kronsell Excel Worksheet Functions 3 October 29th 09 12:47 PM
MATCH problem Smallweed Excel Worksheet Functions 3 January 10th 09 05:59 PM
match problem bill gras Excel Worksheet Functions 8 December 30th 05 05:48 AM
Problem w/ Match prop vs. Match method George Raft Excel Programming 4 January 2nd 05 05:08 PM
match #n/a problem xnman Excel Programming 2 October 3rd 03 05:19 PM


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