+ Reply to Thread
Results 1 to 10 of 10

Index and Match with Array

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2016
    Posts
    12

    Index and Match with Array

    Hello, with Index and Match functions, how can I write a formula to give me the following output column? Excel sheet attached.

    Input Input Output
    Division City All Cities
    Dhaka D1 D1, D2, D3, D4, D5
    Rajshahi R1 R1, R2, R3, R4, R5, R6, R7
    Chittagong C1 C1, C2, C3, C4, C5
    Khulna K1 K1, K2, K3, K4, K5
    Dhaka D2 D1, D2, D3, D4, D5
    Chittagong C2 C1, C2, C3, C4, C5
    Rajshahi R2 R1, R2, R3, R4, R5, R6, R7
    Khulna K2 K1, K2, K3, K4, K5
    Chittagong C3 C1, C2, C3, C4, C5
    Khulna K3 K1, K2, K3, K4, K5
    Dhaka D3 D1, D2, D3, D4, D5
    Rajshahi R4 R1, R2, R3, R4, R5, R6, R7
    Dhaka D4 D1, D2, D3, D4, D5
    Rajshahi R5 R1, R2, R3, R4, R5, R6, R7
    Rajshahi R6 R1, R2, R3, R4, R5, R6, R7
    Chittagong C4 C1, C2, C3, C4, C5
    Khulna K4 K1, K2, K3, K4, K5
    Dhaka D5 D1, D2, D3, D4, D5
    Rajshahi R7 R1, R2, R3, R4, R5, R6, R7
    Chittagong C5 C1, C2, C3, C4, C5
    Khulna K5 K1, K2, K3, K4, K5
    Attached Files Attached Files
    Last edited by aasulman; 10-27-2020 at 10:00 PM.

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Index and Match with Array

    Array formula
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by BMV; 10-23-2020 at 01:59 AM.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Index and Match with Array

    One way:

    Please Login or Register  to view this content.
    Enable mcaros on opening.

    Then this array formula:
    =ConcatAll(IF(($A$2:$A$23=$F2),B$2:B$23,""),"/",TRUE)

    Set array formulae in the first cell with CTRL-SHIFT-Enter and drag down normally. Excel will add the {} round the formula. If you type them, it won't work.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Index and Match with Array

    There is no R3 in the table, but your formula returns one.

  5. #5
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Index and Match with Array

    Quote Originally Posted by Glenn Kennedy View Post
    There is no R3 in the table, but your formula returns one.
    cell D9 in my file :-)
    The first formula skip empty values. The second generate series from 1 to ...
    Last edited by BMV; 10-23-2020 at 03:03 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Index and Match with Array

    Yes, but there is no R3 in column B... Your result creates one that is not there. What if these were locations, or whatever, in each city.

  7. #7
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Index and Match with Array

    Quote Originally Posted by Glenn Kennedy View Post
    Your result creates one that is not there.
    "R3" created only by second formula.

  8. #8
    Registered User
    Join Date
    04-02-2013
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2016
    Posts
    12

    Re: Index and Match with Array

    thank you Glenn a lot. R3 was a mistake.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Index and Match with Array

    You're welcome.

    ________________________________________

    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Index and Match with Array

    I also meant to add:

    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

+ 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. Using a Index + Match array with a cell that has multiple values to match against.
    By psunursingguy21 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-01-2019, 12:22 AM
  2. Use Index Match or lookup to create array from array
    By kinemagichemistry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-01-2018, 02:27 PM
  3. [SOLVED] Need help with Index Match or possibly array type of match
    By chadboehne in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-14-2017, 01:16 PM
  4. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  5. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  6. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  7. Index Match array equation with sub-array calculation
    By glebbo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2012, 03:04 AM

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