10
[VBA] Application.Match Error
Author Summary
gulbronson is
in
VBA
Post Body
Below is a section of my code that attempts to find the index of the maximum Y-value
y_value = Application.WorksheetFuction.Min(y_coords)
Debug.Print y_value, y_coords(6)
Debug.Print y_value = y_coords(6)
y_index = Application.WorksheetFunction.Match(y_value, y_coords, 0)
The max function finds the correct value which should be at index six. The second debug.print line returns True, but I get
"Run-time error '1004':
Unable to get the Match property of the WorksheetFunction class"
Normally I know this means excel failed to find a match, but I know there is and it even agrees the values are equal.
Are there any other factors that could cause this error?
Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
155,151
Link Karma
29,387
Comment Karma
124,641
Profile updated: 1 week ago
Posts updated: 9 months ago
Subreddit
Post Details
Location
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/excel/comme...