+ Reply to Thread
Results 1 to 21 of 21

hwo to get specific name from list as per cell value?

  1. #1
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    hwo to get specific name from list as per cell value?

    Hi Guys!

    i have 4 years data with list of shops. now i need a formula/function which will give me list as per cell value.

    for example; in first month we say 3 shops sale oranges than formula will give 3 shop names from the specific list if there are 2 shops than it will auto repeat one from 2 shops. sample file is attached.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    Where is the date ???

  3. #3
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    in B and C colmun

  4. #4
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    In cell I3 i select apple sold through 3 shops than formula will give me 3 names from of apple shops from C column.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    I said DATE not DATA: you have table labelled with Months (Jan/Feb) but there are no DATES associated with your data.

  6. #6
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    i have sorted those thing but i need list of shops from column C according to Cell I3

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    Sorry but any formula is going to need to consider the date.

  8. #8
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    what if we don't have months than how can we get list of 3 shops from column C
    please do not consider months mentioned in sample file, because i have calculated how much shops provided services in each month now i want list of those shops.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    In I4

    =IFERROR(INDEX($C:$C,SMALL(IF($B$3:$B$20=I$2,ROW($B$3:$B$20),""),ROWS($1:1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Then copy across and down

  10. #10
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    with this formula all shops are showing but i need only 3 shops as i have selected 3 in cell I3.

  11. #11
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    sorry i am not good in English. i don't know how to specify what i need.

    For example: i have 10 shops in a list but in Jan only 3 shops sold the apple now i need the name of 3 shops (it doesn't matter which shop). but if i said 11 shops sold apples than formula will repeat one shop from the 10.

    Hope you understand.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    this ...

    =IF(ROWS($1:1)<=I$3,IFERROR(INDEX($C:$C,SMALL(IF($B$3:$B$20=I$2,ROW($B$3:$B$20),""),ROWS($1:1))),""),"")


    if i said 11 shops sold apples than formula will repeat one shop from the 10.
    Does not address repeat shops.

  13. #13
    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
    43,893

    Re: hwo to get specific name from list as per cell value?

    Is this what you meant:

    =IF(ROWS($1:1)>I$3,"",IFERROR(INDEX($C:$C,SMALL(IF($B$3:$B$20=I$2,ROW($B$3:$B$20),""),ROWS($1:1))),""))

    entered as an array formula:
    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - 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

  14. #14
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    thank you John Topley

    it works as i want. but it would be better if it repeat if number increase from given list.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    Maybe someone else can find a formula to do this.

  16. #16
    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
    43,893

    Re: hwo to get specific name from list as per cell value?

    I think this is it....


    =IF(ROWS($1:1)>I$3,"",IFERROR(INDEX($C:$C,SMALL(IF($B$3:$B$20=I$2,ROW($B$3:$B$20),""),ROWS($1:1))),INDEX($C:$C,SMALL(IF($B$3:$B$20=I$2,ROW($B$3:$B$20),""),ROWS($1:1)-COUNTIF($B:$B,I$2)))))

    array entered.
    Attached Files Attached Files

  17. #17
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,904

    Re: hwo to get specific name from list as per cell value?

    I4=IFERROR(IF(ROWS($1:1)>I$3,"",INDEX($C:$C,SMALL(INDEX(($B$3:$B$20<>I$2)*10^10+ROW($B$3:$B$20),0),MOD(ROWS($1:1)-1,COUNTIF($B$3:$B$20,I$2))+1))),"")
    Try this and copy across
    hope it is what you are looking for
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  18. #18
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    Thank you John for helping it really work for me thanks again. I will work some manual if it increase.

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: hwo to get specific name from list as per cell value?

    You have two formulae for your need to "add" repeat shops (see posts 16 & 17 from Glenn and Siva)

  20. #20
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: hwo to get specific name from list as per cell value?

    thank you Glenn Kennedy.

    really Excel has magic.

  21. #21
    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
    43,893

    Re: hwo to get specific name from list as per cell value?

    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.

+ 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: 6
    Last Post: 02-16-2017, 05:08 PM
  2. Replies: 18
    Last Post: 05-30-2016, 04:05 PM
  3. List selection returns specific cell contents in selected cell.
    By threeninethree in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-15-2014, 05:54 PM
  4. Replies: 2
    Last Post: 08-02-2013, 08:04 AM
  5. Replies: 0
    Last Post: 07-11-2013, 02:08 AM
  6. [SOLVED] Saving cell contents to specific cell in another sheet based on value in list
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2013, 02:51 PM
  7. Retreive a name from a list if an specific name is in a cell
    By Dan Rubinsky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2007, 08:04 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