+ Reply to Thread
Results 1 to 9 of 9

List of values assigned to list of names

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    List of values assigned to list of names

    Hi all,

    I have a column that contains 16 values (sometimes the same) in consecutive rows in sheet 1
    In sheet 2 i have a list of names usually occuring 5 times each consecutively in teh same column. I would like the following to happen, The first number that appears in sheet 1 i would like assigned to the first 6 names in sheet 2 (that is to say unique names) As they appear like so...

    MICK
    MICK
    MICK
    JANE
    JANE
    STEVE
    DANIEL
    PETER
    IAN
    IAN
    so the first value for every occurrence of the first 6 names, the second value for every occurrence of the next 6 (7-12) etc until the end. If i'm not asking too much, the ranges are variable as sometimes there will only 12 or 14 values open ended range references would be good. The number of unique names will always be 6 times the number of values
    Thanks in advance for your help.
    Regards Dan
    Last edited by Cicada; 08-18-2011 at 06:12 PM. Reason: clarity

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: List of values assigned to list of names

    It would help tremendously if you posted a workbook with sample data and the results you want to see (based on that sample data)
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: List of values assigned to list of names

    Thanks for the reply Ron and sorry it has taken so long for me to reply. Here is a very simple example to illustrate what i need. As you can see in sheet1 there are 14 values (this can vary) the number of names in sheet 2 will always be six times the number of values. I would like for the first value in sheet 1 to go next to each of the first six names in this example 470 to go next to Well Bray Beauty to Into the Blue inclusive, the second number in the list to go alongside the next six names and so on until the end. Thank you for your time and help.

    Regards
    Dan
    Attached Files Attached Files

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: List of values assigned to list of names

    If I understand you correctly, you want to assign the Sheet1 values to
    the Sheet2 values in groups of 6 Sheet2 values. For instance, the first 6
    Sheet2 values will each be assigned the 1st Sheet1 value. The next 6
    sheet2 values will each be assigned the 2nd Sheet1 value. etc.

    If that's true, using your posted workbook, this regular formula will do that
    On Sheet2
    B2: =INDEX(Sheet1!$A$1:$A$14,FLOOR((ROW()-2)/6,1)+1)
    Copy that cell down through B85.

    Is that something you can work with?

  5. #5
    Registered User
    Join Date
    07-31-2011
    Location
    london england
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: List of values assigned to list of names

    hey i have a rather similar question relating to Cicada, i think.....
    don't know if anyone knows.
    i have a sheet which i named Define. In this sheet, i want to assign a name to a number.
    For eg, Andy is H1, Billy is H2.
    Then in sheet 2 (called usage), I need to search through row 1, column A, B and C for Andy or Billy.
    For instance, If Andy is found in any of columns A, B and C, I should put a "x" in column D for row 1 where Andy appears in either Column A, B or C.
    How can I do that?

  6. #6
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: List of values assigned to list of names

    Thanks Ron thats what i was after, works well will have to break it down so i can duplicate it in the future. To Mosaictu I think you need a new thread for that one. Would help if i could. Rules state that i need to mark this as solved so i suggest you post a new thread. Think there is a fairly easy solution for those with more experience.

    Regards
    Dan

  7. #7
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: List of values assigned to list of names

    I reopened this post because I stupidly posted the wrong example workbook and when Ron kindly sent me a solution for that sample data i marked it as solved as it worked well for that particular example. I have reposted a new example workbook.As you can see there are duplicates of each name. This example looks fairly uniform as there are five duplicates of each name though it is often the case that it is not so uniform (as seen in my simple example in the original post). What I would like is code that will assign the first value to the first block of six unique names, the next number to the second block of unique names and so on till the end. I would like all duplicates to be assigned the value as well. So in this example range B1:B30 will have the value 470 in each cell in that range. Please don't hesistate to contact me if this post is confusing. written expression has never been my strong point.

    Regards
    Dan
    Attached Files Attached Files
    Last edited by Cicada; 08-10-2011 at 06:46 PM. Reason: forgot to attach workbook

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: List of values assigned to list of names

    Thanks for posting the updated sample workbook...AND...the results you want to see.

    With that new information, this regular formula on Sheet2 will
    sequentially assign the Sheet1 list items, incrementing for each group of 6 unique names
    B1: =INDEX(Sheet1!$A$4:$A$17,FLOOR((SUMPRODUCT((A$1:A1<>"")/COUNTIF(A$1:A1,A$1:A1&""))-1)/6,1)+1)

    Copy that formula down as far as you need.

    Is that something you can work with?

  9. #9
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: List of values assigned to list of names

    Thanks for the response Ron. works perfectly. sorry it took so long to get back. Will now mark this as solved for the final time.

    Regards
    Dan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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