+ Reply to Thread
Results 1 to 7 of 7

Expansion on match index formulas

  1. #1
    Registered User
    Join Date
    06-25-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    10

    Expansion on match index formulas

    I currently use excel 2010 at work ( i have attched a file using excel for mac ).

    I need to populate the "name" into the G column that match the "stores" in H column to "run 1" and "run 2". The formula works fine until I get a repeat in the number. Example - Store 6 appears in run 1 twice and once in run 2. The problem I get is that when I get to the second 6 or the 3rd 6 it keeps returning the first name (Bill). Can anyone help?
    Attached Files Attached Files

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

    Re: Expansion on match index formulas

    Put this formula in C6:

    =IF(B6="","",B6&"_"&COUNTIF(B$6:B6,B6))

    and this one in E6:

    =IF(D6="","",D6&"_"&COUNTIF(D$6:D6,D6)+COUNTIF(B:B,D6))

    and copy both these down to the bottom of your data. Then you can amend the formula in H6 to this:

    =IFERROR(IF(I6,INDEX($A$6:$A$14,MATCH(I6&"_"&COUNTIF(I$6:I6,I6),$C$6:$C$14,0)),""),IFERROR(IF(I6,INDEX($A$6:$A$14,MATCH(I6&"_"&COUNTIF(I$6:I6,I6),$E$6:$E$14,0)),""),""))

    and copy that down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-25-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    10

    Re: Expansion on match index formulas

    Hi Pete,

    Thans for your reply. It works great but without sounding ungreatful I was wondering if it was possible to do this without adding in the extra formulas to columns C and E as in my work spreadsheet they have data in them - Iknow i could just add columns and then hide them but i would prefer not if i can get away with it. Also are you able to run me through how this part of the formula works =IF(B6="","",B6&"_"&COUNTIF(B$6:B6,B6)) - I am unfamiliar with what & and _ do.
    Thanks

  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,084

    Re: Expansion on match index formulas

    How are you generating the data in column I? Is it being generated from B and D, or in some other way?
    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

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

    Re: Expansion on match index formulas

    Your INDEX/MATCH formula is looking for an exact match, and the way MATCH works means that it will find the FIRST occurrence of any duplicated numbers, so you will always get the first name. My formulae set up a unique reference by adding on a sequential number to the store number - the ampersand symbol is the same as the CONCATENATE function (it joins strings together), and the underscore is there just to separate the two elements.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    06-25-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    10

    Re: Expansion on match index formulas

    It is referencing from another worksheet i.e. "=I6'!worksheet2'

  7. #7
    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,084

    Re: Expansion on match index formulas

    In that case - go with Pete's offering. You could also put the helpers on an entirely different sheet and hide it completely...

+ 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] Combining 3 Formulas: Return all Names that Match Criteria Using Index/Match
    By bchilme in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 09-29-2014, 09:28 AM
  2. INDEX and MATCH formulas
    By jls141 in forum Excel General
    Replies: 34
    Last Post: 04-20-2012, 11:07 AM
  3. INDEX / Match formulas
    By Sophster in forum Excel General
    Replies: 7
    Last Post: 03-11-2011, 01:21 PM
  4. index and match formulas
    By sp1974 in forum Excel General
    Replies: 2
    Last Post: 02-16-2010, 12:33 PM
  5. Index & Match Formulas
    By Fatnslow in forum Excel General
    Replies: 2
    Last Post: 10-08-2009, 02:14 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