+ Reply to Thread
Results 1 to 6 of 6

index match array formula - replace cell references with ranges

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    index match array formula - replace cell references with ranges

    I have been using this small example file to try to find a solution to a duplicates problem in a larger workbook.

    when I use this formula

    {=IF(LEN(D3),INDEX($B$7:$B$999,SMALL(IF($A$7:$A$999=D3,ROW($1:$993)),COUNTIF(D$3:D3,D3))),"")}

    the desired result is found

    but when I try to substitute the defined ranges with a named range

    {=IF(LEN(D3),INDEX(NAME,SMALL(IF(CHARGE2=D3,ROW($1:$993)),COUNTIF(D$3:D3,D3))),"")}

    I get random information

    the actual formula I am trying to adapt to name each duplicate value name is

    =INDEX(NAME,MATCH(LARGE(CHARGE2,1),CHARGE2,0),1)

    any help appreciated. sample attached
    Attached Files Attached Files
    Last edited by nigelog; 09-17-2014 at 06:59 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: index match array formula - replace cell references with ranges

    In your second formula ROW($1:$993) makes a problem.

    Define for instance MYROWS as:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and then array formula in E3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    shall work as expected.

    PS. I'm not sure about the idea behind your last formula. may be there was something else in mind, because LARGE(CHARGE2,1) is the same as MAX(CHARGE2)
    Last edited by Kaper; 09-15-2014 at 11:34 AM.
    Best Regards,

    Kaper

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: index match array formula - replace cell references with ranges

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: index match array formula - replace cell references with ranges

    TMS - got your version working first

    Kaper - your version did the job when I moved it to the more complex environment it was required for
    Sorry for delay getting back to you

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: index match array formula - replace cell references with ranges

    Here's another one...

    =IF(LEN(D3),INDEX(NAME,SMALL(IF(CHARGE2=D3,ROW(CHARGE2)-MIN(ROW(CHARGE2))+1),COUNTIF(D$3:D3,D3))),"")

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: index match array formula - replace cell references with ranges

    You're welcome.

+ 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: 4
    Last Post: 03-27-2014, 01:09 PM
  2. A macro to replace Index and Match formula
    By namcheang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2013, 08:08 PM
  3. Replies: 6
    Last Post: 04-12-2013, 05:50 AM
  4. Nested Match(index()) vs. Match() array formula.
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 07:57 AM
  5. Cell References changing - Match / Index
    By kmlloyd in forum Excel General
    Replies: 4
    Last Post: 07-16-2010, 10:47 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