+ Reply to Thread
Results 1 to 4 of 4

Problem with variable types in an index/match function

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    14

    Problem with variable types in an index/match function

    Hi,
    I've been testing a piece of code but can only get it to work when I set my variables to string values and look up an alpha character. When I change my variable to integer and look for a number, I get a "Type Mismatch Error 13". It seems to have something to do with the "evaluate" formula, but not sure. Your suggestions are welcome.

    Below are two versions of my code. FindABC() works, while Find123() gets an error. A test worksheet with these routines are also attached.
    Many thanks!
    Cesar

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Problem with variable types in an index/match function

    Here's an easier way. Replace your CAddress line with

    Please Login or Register  to view this content.
    and see what happens.

  3. #3
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Problem with variable types in an index/match function

    Thank you! Using .find is a much cleaner approach. However, can it be combined with a function to find the cell address in an adjacent column? What I was looking for was a function similar to Vlookup, but rather than bringing back a value from column C, I was looking for the address, hence the Cell/Index/Match mess I wrote.

  4. #4
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Problem with variable types in an index/match function

    Okay, I think I've solved it. By using the Offset feature I can get the address I'm looking for. Thanks again!

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Variable Row Array in Index Match Function
    By Lacaycer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-19-2013, 11:45 AM
  2. Adding a variable to index & match function using VBA
    By prestopr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-07-2013, 05:48 PM
  3. Replies: 2
    Last Post: 11-05-2011, 03:26 PM
  4. Regarding Index & Match function problem
    By ramki in forum Excel General
    Replies: 4
    Last Post: 08-20-2008, 06:15 PM
  5. Index & Match function problem
    By ramki in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2008, 08:13 AM

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