+ Reply to Thread
Results 1 to 9 of 9

Sort and Count Data

  1. #1
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Sort and Count Data

    Good morning all!
    I am looking for a solution to complete a series of tasks. Preferably VB...
    Basically, on sheet3 I want to collect a long list of 6 digit numbers from sheet2 (B:B), remove all duplicate values, place the unique values in sheet3(A:A) and in the adjacent column sheet3(B:B), calculate the number of original occurrences of the number in column A.

    I can do this manually, but I'd like it work automagically, continually updating as new data is entered.

    Thank you in advance!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Sort and Count Data

    Hi madnhain,

    Automagically is a great term. If you can upload a sample of your data with some expected results, we can see if the magic can be applied. I don't see how you can count original occurrences if you've removed duplicates. To upload/attach a workbook click on the "Go Advanced" button below the message area and then on the paperclip icon above the advanced message area.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Re: Sort and Count Data

    I'll have to adjust the data in the workbook as it is sensitive material. This may take some time but I will try to get to it asap.

    I'd calculate the original occurrences using a COUNTIF of the original data.

  4. #4
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Re: Sort and Count Data

    sample_data.xlsx
    Here's some sample data.

    Thank you!

  5. #5
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Re: Sort and Count Data

    Any ideas on this yet?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,666

    Re: Sort and Count Data

    To Sheet3 code module
    Please Login or Register  to view this content.
    Will update each time you select Sheet3

  7. #7
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Re: Sort and Count Data

    Automagical! Thank you kind sir! That works perfectly! I'd like it to sort B descending as well, but I'm pretty sure I can add some code to do that.
    The only issue I have, it deletes all other info in the sheet. is there a way to keep the other information? In column C is a VLOOKUP that gives the corresponding name to the number in column 1 taken from sheet 1 column D. I can deal with not having that, but it would be nice.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,666

    Re: Sort and Count Data

    Change to
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-11-2014
    Location
    Ohio
    MS-Off Ver
    Office 360
    Posts
    13

    Re: Sort and Count Data

    Beautiful. Simply automagical. Sorry for the delay, I've been away on vacation. Thank you for your help! This works perfectly!

+ 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. Excel macro to sort data by word count in one column and expanding to other data columns
    By terryhenderson in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-27-2015, 06:50 AM
  2. Sort data into unique values, then find totals and count
    By dkang2007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2013, 12:08 PM
  3. Using Count/Frequency/Binning to sort data
    By Jarvice in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2012, 06:28 AM
  4. Sort,Count & Sum data based on unique date
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2009, 06:57 AM
  5. Sort and Count Unique Data in 4 Columns
    By miakayuuki in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2008, 11:22 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