+ Reply to Thread
Results 1 to 2 of 2

Need Macro to sort data by unique text value in first column, and organize into 'groups'

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    Need Macro to sort data by unique text value in first column, and organize into 'groups'

    Attached here are 2 excel files: "A" is the starting point. In "B", some of the processing has already been done to the data. I am trying to get this processing done using a macro.

    A.xlsx
    B.xlsx

    If you open "A", there are 2 tabs: "Raw Data" and "Organized Data". In the tab "Raw Data", first column (which is named "Text"), this column contains long strings of text which are unique for each different day in the calendar.

    What I am doing now is tedious: I will put a filter on all the data in tab "Raw Data", and single out a unique set of text under the column "Text". for example, I will filter to show only rows that show "210020120901CAD" in the first column. I select all the filtered data by highlighting and dragging down entire rows, copy, and then go to the next tab named "Organized Data"

    In the "Organized Data" tab, I right-click to select the entire row immediately below the top most date (dates are in the left most column) which has an empty row below it. I then 'insert copied cells' here. I have already added formulas that calculate the subtotals automatically after you insert the cut cells.

    If you open file "B", This is what I would like to achieve in the tab "Organized Data".

    **It doesn't matter if the values in "Text" column from the tab "Raw Data", do not match the dates in the tab "Organized Data". Just as long as under each "Date" in tab "Organized Data", there is a unique value for the first column, as shown in the excel file "B"

    Sorry for the long post and the super tedious task ( appreciate all your help

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need Macro to sort data by unique text value in first column, and organize into 'group

    Hi rookie1995

    Welcome to the Forum!!

    In your Raw Data sheet you have 41 unique items; in your Organized Data sheet you have only 31 dates.

    Just as long as under each "Date" in tab "Organized Data", there is a unique value for the first column, as shown in the excel file "B"
    What's are you thinking should happen here...add more dates? Need to know what your thought process was/is.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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