+ Reply to Thread
Results 1 to 5 of 5

Need formula to combine values in two columns, remove empty cells, & alphabetize.

  1. #1
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    244

    Need formula to combine values in two columns, remove empty cells, & alphabetize.

    I need a formula that will combine two columns, remove the empty cells, and alphabetize the combined results. I've got this formula that got me partially there, but I'm struggling with the removing of empty cells & the alphabetizing part. Eventually, I will need to remove the duplicate entries in the list, but I imagine that will be a second step/helper column.

    I try my best, but I'm a bit of a hack, so I may be complicating things.

    Also, don't want to use the filter thing because the list is constantly changing & want list to dynamically update without user input.

    Any help would be greatly appreciated.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Vendors.jpg

  2. #2
    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,984

    Re: Need formula to combine values in two columns, remove empty cells, & alphabetize.

    With a named range called tbl, covering the range of both columns (can be more columns if needed), this array formula should do what you want:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    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...

    If you need further help, please attach a sheet, not a picture of your sheet!!
    Attached Files Attached Files
    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

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Need formula to combine values in two columns, remove empty cells, & alphabetize.

    Try this ...

    =IFERROR(INDEX($I:$I, SMALL(IF($I$5:$I$46<>"", ROW($I$5:$I$46)), ROWS($K$5:K5))),
    IFERROR(INDEX($J:$J, SMALL(IF($J$5:$J$46<>"", ROW($J$5:$J$46)),ROWS($K$5:K5)-COUNTA($I$5:$I$46))),""))

    Enter with Ctrl+Shift+Enter.

  4. #4
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    244

    Re: Need formula to combine values in two columns, remove empty cells, & alphabetize.

    Glenn Kennedy, I could kiss you! That worked beautifully.

    If I was in Ireland, I'd buy you a pint, but I'm in Maine, so that will have to wait....(the pint buying part, not the kissing)

    Thanks so much for your help. Adding to reputation as soon as I'm done with this post.

  5. #5
    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,984

    Re: Need formula to combine values in two columns, remove empty cells, & alphabetize.

    I'm even further away than Ireland right now. Sitting on a boat in Ha Long Bay, Vietnam, right now. I can barely afford the pints here!!

    Glad to have helped & thanks for the rep.

+ 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. Formula to combine values of 2 cells into a new cell
    By forestavekids in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2016, 03:20 PM
  2. Replies: 1
    Last Post: 03-16-2015, 02:40 AM
  3. MAcro to - copy, transpose, text to columns, remove column A, combine all columns in 1
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-07-2013, 08:48 AM
  4. Replies: 3
    Last Post: 12-21-2012, 05:38 AM
  5. remove error value when formula exists for empty cells
    By Cyrus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2012, 02:49 AM
  6. Help remove the empty columns or rows
    By SimonLee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-20-2011, 11:20 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