+ Reply to Thread
Results 1 to 5 of 5

INDEX Max and Min

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    38

    INDEX Max and Min

    Hi There,

    We are trying to not avail to get Index working for us.
    We have a Row on the top. The formula works to identify those values
    For the Column on the right side. The formula bring a value but it is not correct.
    Something to do with the dynamic formula we suspect

    This one does NOT work
    {=INDEX(COLUMDESC,MAX(IF(TABLEDATA=B10,COLUMN(TABLEDATA)-MIN(COLUMN(TABLEDATA))+1)))}

    This one works
    {=INDEX(ROWDESC,MAX(IF(TABLEDATA=B10,COLUMN(TABLEDATA)-MIN(COLUMN(TABLEDATA))+1)))}


    See attachment for more details

    Best Rgds,
    J
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: INDEX Max and Min

    You are using COLUMN where ROW should be used.

    =INDEX(COLUMDESC,MAX(IF(TABLEDATA=B10,ROW(TABLEDATA)-MIN(ROW(TABLEDATA))+1)))
    Confirmed as Array (CSE).

  3. #3
    Registered User
    Join Date
    05-17-2011
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: INDEX Max and Min

    Thanks CK76
    When we introduce a new reference eg Q5, which is not in the list.
    Our formula brings the first value from both list.
    What can it be done to bring an error message that that product is not there?
    Attached Files Attached Files

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: INDEX Max and Min

    One way.
    =INDEX(ROWDESC,,IF(MAX(IF(TABLEDATA=B10,COLUMN(TABLEDATA)-MIN(COLUMN(TABLEDATA))+1))<>0,MAX(IF(TABLEDATA=B10,COLUMN(TABLEDATA)-MIN(COLUMN(TABLEDATA))+1)),""))

    Confirmed as array.

    Your issue occurs since Index(array,0,0) returns entire list. So you need to return non numeric value to return error for non existing values.

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: INDEX Max and Min

    Alternate formula.
    COLUMN Header Lookup:
    =INDEX(ROWDESC,,SUMPRODUCT(COLUMN(TABLEDATA)*(TABLEDATA=B10))-1)

    ROW Header Lookup:
    =INDEX(COLUMDESC,SUMPRODUCT(ROW(TABLEDATA)*(TABLEDATA=B10))-1)

    Both are non array formula.

+ 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] Create an index keeping original index reference and appending new where necessary
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2016, 01:38 PM
  2. [SOLVED] Create an index keeping original index reference and appending new where necessary
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2016, 01:34 PM
  3. [SOLVED] Index un-indexed items keeping original index numbers where they exist
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-25-2016, 03:55 AM
  4. [SOLVED] Converting Hlookup to Index Match with variable column index number
    By SimonLock in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-09-2015, 09:14 AM
  5. Replies: 4
    Last Post: 12-27-2012, 06:18 PM
  6. [SOLVED] VBA for creating Index-Match every 2 rows where INDEX refer to a different column per row
    By bisaya789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 03:46 AM
  7. Replies: 5
    Last Post: 04-18-2010, 11:06 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