+ Reply to Thread
Results 1 to 28 of 28

Convert 2 lists into 1

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Convert 2 lists into 1

    Hello all,

    I need to create a name range that is the total of 2 name range.

    I can also create a new column with the total lists, but i want it to be flexible cuz i will insert several more items to lists. Hope you can convert this.

    What i have is: in (sheet "login")
    Column E Column Z
    Username Username
    A D
    B E
    C

    I need to have another list called: in (sheet "Validações")
    Users
    A
    B
    C
    D
    E

    Once in a while i increase users so i need this to be automatic in order not to forget.

    Hope some one can help me

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

    Re: Convert 2 lists into 1

    What are the actual range addresses for the lists in the Login sheet?

    Where EXACTLY do you want the new combined lists to appear?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Convert 2 lists into 1

    The atual range adress are in login sheet
    G8:G20 but some are empty for new users
    And T8:T20 in login sheet as well.

    I want to put the combine list in worksheet("validações"). Range("L2:L")

    Hope you can understand me

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

    Re: Convert 2 lists into 1

    Quote Originally Posted by brainzlp View Post
    The atual range adress are in login sheet
    G8:G20 but some are empty for new users
    And T8:T20 in login sheet as well.
    Are the empty cells scattered within the range or are the empty cells at the bottom of the range?

  5. #5
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516
    Quote Originally Posted by Tony Valko View Post
    Are the empty cells scattered within the range or are the empty cells at the bottom of the range?
    Sorry for late reply. The empty cells are always at the Bottom of the range.
    Which means that once we hit empty we can go to next range.

    Hope to hear from you

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

    Re: Convert 2 lists into 1

    Create these dynamic named ranges.

    Name: List1
    Refers to:
    =Login!$G$8:INDEX(Login!$G$8:$G$100,MATCH("zzzzz",Login!$G$8:$G$100))

    Name: List2
    Refers to:
    =Login!$T$8:INDEX(Login!$T$8:$T$100,MATCH("zzzzz",Login!$T$8:$T$100))

    Then, enter this formula in cell L2 on the Validações sheet:

    =IFERROR(IF(ROWS(L$2:L2)>ROWS(List1),INDEX(List2,ROWS(L$2:L2)-ROWS(List1)),INDEX(List1,ROWS(L$2:L2))),"")

    Copy down until you get blanks.

    In the formulas you may have to replace the commas with semi-colons.

  7. #7
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Convert 2 lists into 1

    The last named range I CREATE:
    =DESLOCAMENTO(Validações!$L$2;0;0;CONTAR.VAL(Validações!$L$2:$L$20);-1)
    is not working properly, since the range has formula, he doesn't assume an empty cell.

    How can i get a drop down list without blank cells on that value? (Instead of doing it manually always i insert a user of course)

    Hope to hear from you
    Last edited by brainzlp; 10-06-2015 at 12:36 PM.

  8. #8
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Convert 2 lists into 1

    Quote Originally Posted by Tony Valko View Post
    Create these dynamic named ranges.

    Name: List1
    Refers to:
    =Login!$G$8:INDEX(Login!$G$8:$G$100,MATCH("zzzzz",Login!$G$8:$G$100))

    Name: List2
    Refers to:
    =Login!$T$8:INDEX(Login!$T$8:$T$100,MATCH("zzzzz",Login!$T$8:$T$100))

    Then, enter this formula in cell L2 on the Validações sheet:

    =IFERROR(IF(ROWS(L$2:L2)>ROWS(List1),INDEX(List2,ROWS(L$2:L2)-ROWS(List1)),INDEX(List1,ROWS(L$2:L2))),"")

    Copy down until you get blanks.

    In the formulas you may have to replace the commas with semi-colons.
    All your job worked perfectly, just had to convert to portuguese Excel the formula and switch , to ;
    Although now i need to get a drop down list of that ALL users RANGE, but since there is a formula, it appears in blank several values

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Convert 2 lists into 1

    Tony, see if you can get here now?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: Convert 2 lists into 1

    Quote Originally Posted by FDibbins View Post
    Tony, see if you can get here now?
    Couldn't get here then but I'm able to get here now! (10/25/2015 9:45 AM)

  11. #11
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Convert 2 lists into 1

    In the List4 delete the 5/6/7 and let that column in blank.

    Then check that in the combined column the number 8 of the List5 column doesnt appear.

    Hope you can understand me, at moment i am without computer

    Get back to me asap
    Last edited by brainzlp; 10-26-2015 at 04:20 PM.

+ 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: 1
    Last Post: 07-27-2014, 10:23 AM
  2. [SOLVED] Add or remove info to two lists in Sheet1 and Sheet2 and difference between two lists
    By alipezu in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-01-2014, 12:28 AM
  3. Validation Lists - Multiple dependent lists with unique values
    By Lewigi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 06:42 AM
  4. Replies: 1
    Last Post: 06-14-2013, 04:06 PM
  5. how to ignore blank cells in creatig dropdown lists (validation lists)
    By Elainefish in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2013, 07:45 AM
  6. [SOLVED] How do you convert embedded drop-down lists in Excel '97?
    By RavensChild in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2005, 06:05 PM
  7. Convert Excel Tables to Pivot Table Lists
    By jbesr1230@hotmail.com in forum Excel General
    Replies: 2
    Last Post: 08-10-2005, 07:05 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