+ Reply to Thread
Results 1 to 8 of 8

Data Sorting - Quickly?

  1. #1
    Registered User
    Join Date
    01-10-2016
    Location
    England
    MS-Off Ver
    Microsof Excel for Mac 2011
    Posts
    4

    Data Sorting - Quickly?

    Evening

    We run a computer system which tracks all sales and on a monthly basis the data is removed from there into a CSV file which I then open in excel to sort into a manor that we want.
    On a monthly basis there is a vast amount of information pooled from column A to AK and Row 2 to however many sales (last month was down to row 7101)

    To enable me to report the sales in a manor that we want I end up having to Select column T (Product Name) and then Filtering out certain products e.g. consults/time/vaccines/surgery/lab etc and replacing the wording in column AH (Product Type) with the relevant coding
    Obviously at the moment I do this manualy for 40 different products

    i.e. select column T (product name), select filter, filter out a specific product name (e.g. Consultation) then find and replace (find - service, replace - consult) and then start on the next product on the list
    Once this has been done pivot tables are made to show the sales and number of units

    Unfortunately I can't just make the pivot table from the product name as a number of them need to come under the same heading

    This is done on a monthly basis and is starting to get somewhat time consuming and boring!

    Is anyone aware of another way that it can be done quickly?
    I was wondering would a macro be the way forward? Should it be something that can be set up so that it records my steps and then can just be run to do it for me?
    If so how do you go about this?

    Thoughts greatly appreciated!
    Last edited by dfall; 01-10-2016 at 05:25 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Data Sorting - Quickly?

    Hi, welcome to the forum

    Hard to say for sure without seeing some samples of what you are working with, and what you want. However, you could probably use something like INDEX/SMALL for this.

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-10-2016
    Location
    England
    MS-Off Ver
    Microsof Excel for Mac 2011
    Posts
    4

    Re: Data Sorting - Quickly?

    Thanks for your reply and sorry for the delay in getting back to you

    I have attached a file which contains a simplified version of the raw data.

    on Sheet 1 - It shows the raw data as how I'd receive it from the other computer system, (I have removed a number of columns on the one attached to make it more simple!)

    Sheet 2 - is the raw data but also added column P shown in yellow this is the product type and what it needs to change to, the product type is dependent on the product name. At the moment at the end of every month I Filter the product name column for instance to contain 'consult' I would then go find 'service' and replace it with 'consult'. There are other products that would also want to be contained in 'consult' product type

    Sheet 3 - that just shows the pivot table i'm trying to create at the end once I have sorted the date.

    Hope this makes sense .........
    Attached Files Attached Files

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

    Re: Data Sorting - Quickly?

    It looks like the values in sheet 2 column P are more dependent on column D than column O, where all of the cells say Services. If I am correct and if you want a formula to automatically fill in column P the following is a solution. I first used "Advanced Filter" to make a unique table list of column D as placed in columns U - Y (the placement is not important). I then put this formula in Sheet2!P2:P116:
    Please Login or Register  to view this content.
    Here is your file with the formula applied in Sheet2:
    Copy of ex1 (Index Sumproduct).xlsx
    One issue I found was that "Remove Stitches" which is usually classified as product type "Consult", was classified as "Surgery" in row 98. The table is set up to classify it as "Consult".
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    01-10-2016
    Location
    England
    MS-Off Ver
    Microsof Excel for Mac 2011
    Posts
    4

    Re: Data Sorting - Quickly?

    I think we are getting closer! But I'm having issues getting it to work in the big files with 7000+ enteries

    I have attached it so you can see maybe where I'm going wrong?

    On sheet 2 I have listed all the reporting categories i.e. the stuff that you used an advanced filter for before hand, i just copied and pasted these off the computer system and placed them under the correct heading.
    Not all product names will be here though - does this matter? If they are not there it likely means that the reporting category is to stay as what the computer system said the product type was originally (this will most likely be stock)

    I have had to reduce the number of entries so that i can attach it to here!

    Hopefully this makes sense and is something easy? If its not going to work then maybe i'll just have to go back to the old way!

    Regards
    Attached Files Attached Files

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

    Re: Data Sorting - Quickly?

    Lets see if this array formula gets us any closer:
    Please Login or Register  to view this content.
    Activate with Ctrl+Shift+Enter after pasting in P2, then double click the fill handle to pass the formula to the rest of the column. It will try to match the Product name in column B with one of the reporting categories on sheet 2. If it is unable to find a match it will show the consultation type from column A instead. If it finds a match then it will show the reporting category from sheet 2.
    Let me know if you have any questions.

  7. #7
    Registered User
    Join Date
    01-10-2016
    Location
    England
    MS-Off Ver
    Microsof Excel for Mac 2011
    Posts
    4

    Re: Data Sorting - Quickly?

    Thats the one, works a treat, if only I could work out how to have done it myself!!

    Thank you

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

    Re: Data Sorting - Quickly?

    You're Welcome and thank you for the feedback. If you haven't already, please take a moment to mark the thread 'Solved' using the thread tools link above your first post. Browse through the forums and you'll pick up understanding, also running the evaluate formula on formulas that you'd like to understand is a good way to learn. Hope that you have a nice day.

+ 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. How to quickly update data from another workbook
    By Johnb11 in forum Excel General
    Replies: 4
    Last Post: 10-24-2015, 05:27 AM
  2. [SOLVED] How to quickly add new series data into a chart
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 05-18-2015, 01:36 PM
  3. Excel Quickly Match Data
    By nkangal in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-19-2014, 06:12 PM
  4. Finding duplicate data quickly in a row?
    By lesliepear in forum Excel General
    Replies: 7
    Last Post: 12-05-2009, 09:50 PM
  5. Data Validation=> List=> code for quickly finding data
    By goodgirl1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2007, 03:39 AM
  6. How do I quickly reverse the order of a set of data
    By mdaiga in forum Excel General
    Replies: 3
    Last Post: 04-07-2005, 06:06 PM
  7. sorting data different ways quickly
    By Edward in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2005, 07:06 PM

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