+ Reply to Thread
Results 1 to 4 of 4

Dynamic Range for Match Function

  1. #1
    Registered User
    Join Date
    07-11-2023
    Location
    Saudi Arabia
    MS-Off Ver
    2016
    Posts
    3

    Dynamic Range for Match Function

    Hello Everyone,

    I have an excel file with three sheets as follow, services, parts and invoices
    I used the match function on the services sheet to find at which row the invoice of that service starts in the invoices sheet =MATCH("Invoice #8468",INVOICES!A:A,0) and let say it returns
    Now what I am trying to do is using another match function but using the value provided in the first match function (82) as the beginning of the lookup array

    something like =MATCH("------------Services","INVOICES!A"&L2&":A1000",0)

    This is needed in order to find the discount for the services which only appears in the invoices

  2. #2
    Registered User
    Join Date
    07-11-2023
    Location
    Saudi Arabia
    MS-Off Ver
    2016
    Posts
    3

    Re: Dynamic Range for Match Function

    I have attached a dummy file
    Attached Files Attached Files

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Dynamic Range for Match Function

    You can use this formula in cell M2 of the Services sheet:

    =MATCH("------------Services",INDIRECT("Invoices!A"&L2&":A1000"),0)

    You should note, though, that MATCH returns the relative position of the match within the range, so if the result is 12 and L2 contains 82, then this refers to row 93 within the INVOICES sheet.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    07-11-2023
    Location
    Saudi Arabia
    MS-Off Ver
    2016
    Posts
    3

    Re: Dynamic Range for Match Function

    Thank you very much, the formula worked like a charm

+ 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. Match ComboBox with dynamic range, then add Textbox1 to dynamic range
    By Lasse Moe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 01:26 AM
  2. [SOLVED] Dynamic Name Range using Offset&Match with Match based off a different column
    By mdlpjr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 06:33 PM
  3. Copy/Paste Dynamic Range based on Match Function
    By spyderman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2013, 07:31 PM
  4. using offset function to create dynamic range based on a match search
    By freddiethomas in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-08-2013, 05:34 AM
  5. using offset function to create dynamic range based on a match search
    By freddiethomas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 04:14 AM
  6. [SOLVED] Using MATCH function with dynamic range from a different sheet
    By jtaxtim in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-17-2012, 01:35 PM
  7. [SOLVED] Dynamic Range Argument within The MATCH Function
    By Spiros in forum Excel General
    Replies: 5
    Last Post: 06-01-2012, 03:59 PM

Tags for this Thread

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