+ Reply to Thread
Results 1 to 3 of 3

Match/Index array in VBA to return cell address

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Match/Index array in VBA to return cell address

    Hi all

    Still very VERY new to VBA so apologies if this is a stupid question!

    I've got a formula working in my spreadsheet which is as follows

    =INDEX(A2:Q15,MATCH(1,INDEX(($A$2:$A$15="Hours")*($B$2:$B$15="AWH"),0),0),MATCH("July",$A$1:$Q$1,0))
    The purpose of the code is to find the row by matching two criteria, then find the column matching a third criteria.

    Ultimately what I want to do is return a cell reference, but if I can get it to work returning a value for me, that's a start!

    I can get the following working in VBA to check two criteria (one row, one column) but it won't work on the third

    Please Login or Register  to view this content.

    It returns an error (Argument not optional) if I try to add a third criterion with the code below

    Please Login or Register  to view this content.
    Any ideas? might be a syntax thing or maybe I should start from scratch, all ideas welcome

    Thanks

    D
    Attached Files Attached Files
    Last edited by djhsickboy; 09-02-2011 at 02:21 AM. Reason: Removed Code Tags from Formula

  2. #2
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Match/Index array in VBA to return cell address

    Hi,

    I hope this is what you want

    Please Login or Register  to view this content.

    Elio Fernandes
    Last edited by efernandes67; 09-01-2011 at 04:02 PM.

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Match/Index array in VBA to return cell address

    That's fantastic Elio! Thank you!

    D

+ Reply to Thread

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