+ Reply to Thread
Results 1 to 8 of 8

Find names corresponding to top 5 age (with multiple same age)

  1. #1
    Registered User
    Join Date
    03-14-2019
    Location
    Melbourne
    MS-Off Ver
    Office 2016
    Posts
    17

    Find names corresponding to top 5 age (with multiple same age)

    Hi all

    I was trying to get the site names corresponding to top 5 age (days). However, my formula below is not returning me blank cell.(Attached file)

    =IFERROR(INDEX('Capacity Data'!$C$2:$C$3113,MATCH(1,INDEX(('Output'!B3:B7=LARGE('Capacity Data'!$H$2:$H$3113,ROWS('Capacity Data'!$C$1:C3113)))*(COUNTIF('Output'!A3:A7,'Capacity Data'!$C$2:$C$3113)=0)*(COUNTIF('Capacity Data'!$G$2:$G$3113,$D$3)=0),),0)),"")

    When I am trying to get the 'Site Name' for Two same age it throws error.

    Thanks for helping!
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Find names corresponding to top 5 age (with multiple same age)

    Perhaps, for "Site" name, put this on A3 and copied down:

    =IF(ROWS($A$1:A1)<=5,IFERROR(INDEX('Capacity Data'!$C$3034:$C$3110,MATCH(1,INDEX(('Capacity Data'!$H$3034:$H$3110=LARGE('Capacity Data'!$H$3034:$H$3110,ROWS($A$2:A2)))*(COUNTIF($A$2:A2,'Capacity Data'!$C$3034:$C$3110)=0)*('Capacity Data'!$G$3034:$G$3110=$D$3),),0)),""),"")

    For "Age", put this on B3 and copied down:

    =IFERROR(VLOOKUP(A3,'Capacity Data'!$C$3034:$H$3110,6,FALSE),"")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-14-2019
    Location
    Melbourne
    MS-Off Ver
    Office 2016
    Posts
    17

    Re: Find names corresponding to top 5 age (with multiple same age)

    Thanks Azumi for your reply.

    Just trying to understand the changes that you suggested, on the 'ROWS($A$1:A5)<=5' section. Why are we starting from position 1 to position 5?

    Also, why are we looking at 'ROWS($A$2:A6))' further down in the function when we are desired to populate the data from A3 to B7 (attached output in previous post)



    Thanks for helping
    Attached Images Attached Images

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Find names corresponding to top 5 age (with multiple same age)

    Because in the title you want the 5 biggest age values, so that I combine with IF function, when the formula (when copying down) bigger than 5 rows it show blanks, the rows($A$1:A1) when dragged down it show number from 1 and up, when reaching 5 it stops there then shows blanks

  5. #5
    Registered User
    Join Date
    03-14-2019
    Location
    Melbourne
    MS-Off Ver
    Office 2016
    Posts
    17

    Re: Find names corresponding to top 5 age (with multiple same age)

    Thanks azumi

    Wondering if there is an simpler way of approaching it instead of using ROWS in the formula...

    Thanks for helping!

  6. #6
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Find names corresponding to top 5 age (with multiple same age)

    Quote Originally Posted by roman22 View Post
    Thanks azumi

    Wondering if there is an simpler way of approaching it instead of using ROWS in the formula...

    Thanks for helping!
    Using ROW function is the simplest way

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Find names corresponding to top 5 age (with multiple same age)

    Another method

    A3
    =IF(B3="","",INDEX('Capacity Data'!C:C,AGGREGATE(15,6,ROW('Capacity Data'!H$1:H$3110)/('Capacity Data'!$H$1:$H$3110=B3)/('Capacity Data'!$G$1:$G$3110=$D$3),COUNTIF(B$3:B3,B3))))

    B3
    =IFERROR(AGGREGATE(14,6,'Capacity Data'!$H$1:$H$3110/('Capacity Data'!$G$1:$G$3110=$D$3),ROWS(B$3:B3)),"")
    Attached Files Attached Files
    Last edited by Bo_Ry; 03-27-2019 at 01:31 AM.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,659

    Re: Find names corresponding to top 5 age (with multiple same age)

    IN A3
    Please Login or Register  to view this content.
    IN B3
    Please Login or Register  to view this content.
    Drag down both.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-27-2019 at 06:44 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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] FIND Multiple names as part of a SUMPRODUCT
    By mathis21788 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2017, 11:38 AM
  2. Find and Replace multiple variations of misspelled names.
    By KMaree in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-29-2015, 05:35 PM
  3. vba find unique names in multiple columns
    By Konexcelmath in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2014, 09:10 PM
  4. Three columns of names, find names that are not in all three?
    By hoobajoob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-07-2013, 06:02 AM
  5. Replies: 3
    Last Post: 02-11-2012, 08:34 AM
  6. Find Formula needs to find jobs with split names
    By 3smees23 in forum Excel General
    Replies: 5
    Last Post: 08-06-2009, 08:18 AM
  7. Replies: 1
    Last Post: 01-19-2006, 05:10 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