Results 1 to 7 of 7

MATCH function with a variable as lookup_value?

Threaded View

  1. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: MATCH function with a variable as lookup_value?

    I´ve changed A1:A90 to number format and all other numbers in the Excel file to number format as well.
    Changing the number format of a cell does not (usually) change the actual value of the cell. A few tests I would suggest:

    1) in a blank column, put the formula =isnumber(a1) and copy down. TRUE indicates that the "number" in A1 is an actual number. FALSE indicates that the "number" in A1 is a text string that only looks like a number.
    2) select a cell from A1:A90 and, in the VBA immediate window, execute a statement like debug.print typename(sheets("...").range("A34").value) and see if it returns double or string or other.

    If any of these kind of tests indicate that the values in A1:a90 are text strings rather than numbers, you will need to either convert them to numbers or change your variable type to string.
    Last edited by MrShorty; 02-22-2013 at 06:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1