+ Reply to Thread
Results 1 to 10 of 10

Creating unique list of values from multiple columns not in sequence.

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

    Creating unique list of values from multiple columns not in sequence.

    Hello,

    I have an inventory/sales Excel spreadsheet for our retail store that I've been working on/improving upon for the last few months. I've included a version of the file below (unfortunately vastly cut down to meet size limitations of forum attachments).

    Basically, I have monthly tabs where we enter the daily sales info and then we have a monthly reports tab that tabulates all of the data into monthly summary reports. Everything works beautifully, but there is one part of the spreadsheet I'd like to improve, but just can't figure out how to accomplish.

    For all the retail category sections, the items we sell is standard and does not change. However, in the "Accounts" section of each daily report, the items change day to day and the associated "Dept." varies as well. I use the "Dept." column to distinguish "Retail" sales from various account sales which get flagged as "DORR (A)", "FERRY (A)", "BUNKER (A)", & "GALLEY (A)". As you will see on the "Monthly" tab, all those various items & associated accounts are compiled in the "Accounts" section of that page. Unfortunately, this is entered manually which invites user errors.

    Here's a visual mock-up of the problem:
    Lobstore Excel.jpg

    I've researched the problem and found this formula (not adapted to my specifics) that will compile multiple columns into one unique list, but it assumes that all the columns are in sequence. It also does not meet my needs for also moving over the corresponding account names with each item.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is this possible to do via formulas, or does this need VBA?

    Thanks for reading my post and any insight you might be able to share.
    Last edited by Big.Moe; 06-07-2017 at 09:25 PM. Reason: Added Visual Mock-Up for Clarity

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

    Re: Creating unique list of values from multiple columns not in sequence.

    For clarity sake, I added a visual mock-up to my post. Perhaps that will aid in the understanding of my query.

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Creating unique list of values from multiple columns not in sequence.

    This proposed solution employs a helper table (Q107:V249) which could be moved and/or hidden for aesthetic purposes.
    Column Q is a copy of the 'Item Description' column from the 'Ref Sheet'
    Columns R:U are populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column V is populated by the array entered formula*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column B, the Item Description column on the monthly sheet, is populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column E is populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are activated 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.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  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: Creating unique list of values from multiple columns not in sequence.

    JeteMC, you are the best!!!

    When I read your reply, I was in the process of investigating the use of a helper column, but I was still light years away from a solution. You sir, have saved me countless hours of brain wrenching trial & error work, and for that I sincerely thank you.

    I'm in the process of converting your approach/formulas to match the references in my full workbook, but so far it looks likes a winner.

    I'm hiding the helper table on the 'REF SHEET' which keeps the daily & monthly reports clean & uncluttered. That 'REF SHEET' is like that closet where you throw all the unsightly junk in your house.

    Thanks again.
    Big.Moe

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Creating unique list of values from multiple columns not in sequence.

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

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

    Re: Creating unique list of values from multiple columns not in sequence.

    Hi JeteMC,

    I just have one question regarding one of your formulas:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    What is the function of the entries 6553601 & "R0C00" in the formula?

    The reason I ask this is because I am now doing the same thing for the "Other" category in the workbook and for some reason this formula is giving me the wrong values in the sorted unique list. Instead of "Oysters/CHRIS (O)", the formula is returning "FISH" on every line.

    Excel Problem.jpg

    Here is your formula adapted by me to suit the "Other" category:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I can't see anything that should return such results, but I'm unfamiliar with the two entries I listed above.

    If you would be so kind, could you take a quick peek.

    Thanks.

    ***EDIT***
    I figured-out the problem, but still clueless on why it is happening.

    The problem happens once I get to column DD. Everything works great prior to that column, but as soon as I reach DD, the formula stops working.

    Funny thing though, the other formulas work just fine from column DD onward. It's limited to just this formula.
    Last edited by Big.Moe; 06-08-2017 at 11:15 AM.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Creating unique list of values from multiple columns not in sequence.

    The 6553601 is the value_if_false argument of the IF function and replaces FALSES so that when the MIN function picks a number 6553601 will be larger than the largest possible sum of the row number multiplied by 100 plus the column number. The "R0C00" part is the format_text argument of the TEXT function. This is sending INDIRECT row and column column coordinates in the fashion of the R1C1 reference style, as opposed to the more common A1 reference style.
    If you select the cell V108 in the file attached to post #3 and then use the Evaluate Formula feature (Formulas tab) you can see that the MIN function picks 11018 which the TEXT function interprets as R110C18 (row 110, column 18 or R110 in the A1 reference style).
    Try running the Evaluate Formula on your cell DD5 and see if the TEXT function returns R5C104 which is CZ5 in the A1 reference style.
    Let us know if you have any questions.

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

    Re: Creating unique list of values from multiple columns not in sequence.

    When I evaluate the formula in cell DD5, the TEXT function returns R6C04 for some reason. "Fish" is indeed the value that is in cell D6, but why the formula is sending me somewhere outside the range CY$5:DC$193 set in the formula, I haven't got a clue. The kicker is that, if I move that table one column to the left, the formula works perfectly.

    Could it be that when I reach column DD, I have somehow gone beyond the max parameters set in the formula?

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Creating unique list of values from multiple columns not in sequence.

    Let's try this array entered formula* instead:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It takes a little longer to run and the results are in a different order, however I think that it will convert to your category 'Other' table more reliably.
    Let us know if you have any questions.
    Attached Files Attached Files

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

    Re: Creating unique list of values from multiple columns not in sequence.

    Boy, that 2nd formula really does ramp-up the calculation time.

    I decided to separate the helper tables onto different tabs in order to use your original formula. Still can't figure out why it crashes at column DD, but since it works so beautifully up until that point, I will adjust my layout to suit the formula.

    I'm actually surprised at the efficiency in which Excel performs calculations. I do realize this workbook is getting to be a bit bloated (~20MB), but I have a i7-7700k with 32GB of memory, and my system is still chugging when doing the calcs. Seems more of a function of the software then a hardware limitation, but I'm no programmer, so again I adjust to fit the situation and turned calcs to manual for now.

    Thanks again for all your help JeteMC.....much appreciated.

    P.S. Please don't spend any time on this, but if by chance you get a light bulb moment on why the formula stops working at column DD, let me know. I'm the curious type and always love to know why.

+ 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] List unique values from multiple columns
    By macrorookie in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-29-2016, 07:56 PM
  2. [SOLVED] Combining list of Unique Values from Multiple Columns and with Total Value
    By masood78 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2016, 07:27 PM
  3. compile two columns according sequence of unique list
    By shukla.ankur281190 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-06-2016, 02:34 AM
  4. Creating a unique reference to a multiple sequence
    By xatomicx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2015, 06:22 PM
  5. List of Unique Values from Multiple Columns
    By filkod in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2015, 03:57 AM
  6. Replies: 3
    Last Post: 07-08-2014, 03:10 PM
  7. [SOLVED] Creating List of Values that Appear in Multiple Columns
    By sskgintl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-23-2013, 10:19 AM

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