Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Application.Match Type mismatch error

I'm trying to use the Application.Match call using two arrays.

The exact line is:

e = Application.Match(query(i,0),tempquery,0)

query(i,0) holds a Variant/String that looks something like

"100010300106800000"

tempquery is an array holding a series
of similar values as strings.

I supposed I could convert them all to
values, but I think it drops trailing or leading
zeros and that could screw up the match as well.

Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Application.Match Type mismatch error

This could be indicative that tempquery has more than 5461 elements.

--
Regards,
Tom Ogilvy

" wrote in message
ups.com...
I'm trying to use the Application.Match call using two arrays.

The exact line is:

e = Application.Match(query(i,0),tempquery,0)

query(i,0) holds a Variant/String that looks something like

"100010300106800000"

tempquery is an array holding a series
of similar values as strings.

I supposed I could convert them all to
values, but I think it drops trailing or leading
zeros and that could screw up the match as well.

Any suggestions?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Application.Match Type mismatch error

Tempquery is only one dimensional. And it contains about 12000 unique
items in the list.
The only thing I could think of is that in the line e is dimensioned as
a long while the items in query and tempquery are
variant/strings.....but that shouldn't matter I would think...

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Application.Match Type mismatch error

I thought this limitation didn't exist in xl2000 and beyond....?
If it does, I guess I could break the tempquery into batches 5461
elements long (plus some leftover) and do the match that way.



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Application.Match Type mismatch error

you need to dim e as variant to catch the errorvalue when there is no match
: otherwise you will get a type mismatch error


Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

" wrote in message
ups.com...
I thought this limitation didn't exist in xl2000 and beyond....?
If it does, I guess I could break the tempquery into batches 5461
elements long (plus some leftover) and do the match that way.



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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Type Mismatch Error Need Help Ray Batig Excel Programming 1 September 16th 03 12:57 AM


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