🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #104453

VLOOKUP/MATCH problem

#104453
From: Pierre Fichaud
Date: Wed, 27 Jan 2010 21:33
17 lines
1368 bytes
Hi,
	I'm trying to use a cell in one sheet to find a row in another sheet.

xd = WorksheetFunction.Substitute(cd, "/", "-")
j = Application.Match(xd, Sheets("Sheet2").Range("a2:a800"), 0)


xd has a value of "2010-01-11" after the substitute function has 
executed and column a in Sheet2 has date values with exactly the same 
format. I always get "Error 2042" no matter what I do. Vlookup gives the 
same result.

It has something to do with dates, I'm sure.

Can someone help?

TIA, Pierre.
Technical Details
Message-ID: <Sj28n.40204$U83.33437@newsfe10.iad>
Path: mbox-mo1.pugleaf.net!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder1.xlned.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe10.iad.POSTED!3a466471!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder1.xlned.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe10.iad.POSTED!3a466471!not-for-mail
From: Pierre Fichaud <prf51@videotron.ca>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: pl.comp.lang.vbasic
Subject: VLOOKUP/MATCH problem
Lines: 17
Message-ID: <Sj28n.40204$U83.33437@newsfe10.iad>
X-Complaints-To: abuse@teranews.com
NNTP-Posting-Date: Wed, 27 Jan 2010 21:34:42 UTC
Organization: TeraNews.com
Date: Wed, 27 Jan 2010 16:33:31 -0500
Bytes: 1373
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit