+ Reply to Thread
Results 1 to 13 of 13

Formula to tidy a lists

  1. #1
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Formula to tidy a lists

    Hi Guys,

    I'm looking to create a tidy version of a list I have. Example.

    Column A1 down Customer name
    Mickey Mouse
    Donald Duck
    Minnie Mounse
    Daisy Duck
    Etc

    Column B1 down Product bought
    Apple
    Apple
    Banana
    Banana
    Apple
    Grapes
    etc


    I want column C to create a list of all products sold, but without any gaps or duplicates
    So Column C1 down giving the example above would read
    Apple
    Banana
    Grapes

    Hope this makes sense & thanks in advance

  2. #2
    Registered User
    Join Date
    11-22-2018
    Location
    Roma,Italia
    MS-Off Ver
    2013
    Posts
    40

    Re: Formula to tidy a lists

    Buongiorno
    poniamo i dati da B2 a scendere in C2 da trascinare in basso

    =SE.ERRORE(INDICE(B$2:B$100;CONFRONTA(0;INDICE(CONTA.SE($C$1:C1;$B$2:B$100&"");0));"")
    Attached Files Attached Files

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to tidy a lists

    If you only have Excel 2003 and not (I think 2007 and later) then you could use the Advanced Data Filter to extract a unique list.

    Otherwise just select the range i question and use the Remove Duplicates option on the Ribbon
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: Formula to tidy a lists

    I have tried that in my sheet and I get #Name?. I'm using 2003
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: Formula to tidy a lists

    Thanks Richard,

    Was hoping for something a little more Automatic. I will be using this tidies list in a formula else where so would like it constantly updated.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to tidy a lists

    Quote Originally Posted by Nitro2481 View Post
    Thanks Richard,

    Was hoping for something a little more Automatic. I will be using this tidies list in a formula else where so would like it constantly updated.
    Don't forget that for most things you do manually you can easily automate them with a macro.

    Use the macro recorder to do the task then upload the workbook so that we can generalise the macro you captured.

  7. #7
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: Formula to tidy a lists

    Hi Richard,

    Really appreciate you taking the time

    The way I have it is

    eg

    I have a "product" list in a number of different columns. Eg B, C, D,E, F, G, H, I etc
    So in J I am looking for the tidied list of B, in K the tidied list of C and in L the tidied list of D and so on. I have 8 lists in total

    I dont think Autofilter will do that?

    That guys formula above seemed to work when I opened the sample spreadsheed he supplied but when I press enter it changed to #Name? Is this because I'm 2003. Is there no formula I can use for 2003?

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to tidy a lists

    IFERROR does not work in Excel 2003. You can use IF and ISERROR to achieve the same result.

    Based on the sample that you have shared in post #1, try this in C2:

    =IF(ISERROR(INDEX(B$2:B$100,MATCH(0,COUNTIF(C$1:C1,B$2:B$100),0))),"",INDEX(B$2:B$100,MATCH(0,COUNTIF(C$1:C1,B$2:B$100),0))) Ctrl Shift Enter

    Drag the formula down. It is currently set up to handle 99 rows of data (rows 2:100).

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to tidy a lists

    Hi,

    I didn't actually mention the Autofilter, I suggested either the Data Advanced Filter or the RemoveDuplicates syntax

    Here's the macro, the file is attached

    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: Formula to tidy a lists

    Think I'm nearly there. This is still showing Duplicates. My row Starts on 3 so I'm assuming I change the "B's" to 3. Should I change the C1's too?

  11. #11
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to tidy a lists

    In your original post, you said that your data starts with headers in row 1 so that's what the formula in post #8 was based on.

    If your data starts in row 3, you can use this in C3:

    =IF(ISERROR(INDEX(B$3:B$100,MATCH(0,COUNTIF(C$2:C2,B$3:B$100),0))),"",INDEX(B$3:B$100,MATCH(0,COUNTIF(C$2:C2,B$3:B$100),0))) Ctrl Shift Enter

  12. #12
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: Formula to tidy a lists

    Absolute Gent.

    Worked perfect. Thanks to everyone for taking the time.

  13. #13
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to tidy a lists

    Happy to help. 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. Can I tidy this Vlookup formula?
    By Robbo84 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2017, 10:13 AM
  2. Tidy a formula
    By zurg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2015, 05:43 AM
  3. Using a UDF to tidy a cell's formula output
    By butler342 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2013, 08:31 AM
  4. I want to use an "ISERROR" in my formula to tidy it up!
    By David_S_Walker in forum Excel General
    Replies: 4
    Last Post: 03-22-2010, 07:23 AM
  5. UserForm Tidy Up & Formula
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-19-2010, 11:19 AM
  6. Can anyone help me tidy up?
    By drucey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2006, 03:10 PM
  7. [SOLVED] Tidy Up
    By Pete in forum Excel General
    Replies: 4
    Last Post: 05-09-2005, 01:06 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