+ Reply to Thread
Results 1 to 2 of 2

How to make a "table_array" cells selection dynamic in a search function

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    Paris
    MS-Off Ver
    10
    Posts
    13

    How to make a "table_array" cells selection dynamic in a search function

    I was wondering whether someone could help me on this.
    When using a search function, for istance a Hlookup function, I need to specify the following parameters: lookup_value; table_array; row_index_num; range_lookup.

    I don't have problems with "lookup_value" since I can refer it to a cell that contains a number and it works OK; same goes with row_index_num and range_lookup.

    However, I don't find a way to correctly fill the "table_array" parameters using text. I am defining the "table_array" as text referring to a range of cell, using "B8:J12" in my exemple, and I get a "#N/A" answer. I can't find any other way than to manually select a range of cells, which I want to avoid.
    What text format should I use, or is there a function I need apply to make the search function work? Is it a syntax issue?

    What I want to achieve is using dynamic cell selection to automate the search function.
    For ease of reference I have attached a sample excel file to illustrate my query.

    Thanks for looking into this.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to make a "table_array" cells selection dynamic in a search function

    Use INDIRECT()

    =+HLOOKUP(B21,INDIRECT(B22),5,FALSE)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ 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. Replies: 3
    Last Post: 10-13-2017, 07:07 AM
  2. How to use InStr function to search for a text that starts with "CTF" and ends with "."?
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2014, 06:52 PM
  3. How to make a selection of cells "active cells"
    By mbergamo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2014, 10:19 AM
  4. Excel VBA Code to make my Toggle Buttons output "Yes" or "No" to their cells
    By mebanet in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2013, 06:14 AM
  5. Replies: 3
    Last Post: 05-23-2012, 03:33 AM
  6. Replies: 1
    Last Post: 05-23-2012, 02:06 AM
  7. Replies: 2
    Last Post: 05-05-2008, 04:51 PM

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