+ Reply to Thread
Results 1 to 11 of 11

Divide data into categories

  1. #1
    Registered User
    Join Date
    08-01-2014
    Location
    Helsinki, Finland
    MS-Off Ver
    2007
    Posts
    10

    Divide data into categories

    Hello, I am working on my thesis empirical part now and need help....
    I have 10 years from 2003 to 2012 and need to divide this into 2 categories pre-cisis and post-crisis. How can I do that? help me please

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Divide data into categories

    Is the data organized into a table? Does every row have a date?

    Please upload an example - someone can probably just add a column to your table(s) to indicate whether each row is pre or post crisis.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,921

    Re: How can I divide data into two categories?

    Without a sample of your data, it is very difficult to give any specific suggestions.

    If your data are arranged in a convenient "list", then I would be tempted to use one of Excel's filtering tools: http://office.microsoft.com/en-us/ex...517.aspx?CTT=1

    You should be able to filter the list to show the data before your "crisis" date, then copy that data to a convenient place (probably on a separate tab), then filter the list to show the data after the crisis date, and copy that to a separate tab. Once you have the two data sets in separate locations, you can use whatever formulas you need to analyze the data sets.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    08-01-2014
    Location
    Helsinki, Finland
    MS-Off Ver
    2007
    Posts
    10

    Re: Divide data into categories

    Thank you for reply. Yes.
    I can attach the file.
    I need to group years from 2003-2008 & 2009-2012.
    Hope someone can help me.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-01-2014
    Location
    Helsinki, Finland
    MS-Off Ver
    2007
    Posts
    10

    Re: How can I divide data into two categories?

    THank you MrShorty.
    I attached the sample if you can check. Because filtering does not help it gives chances like filter by cell color, font color, etc. but not numbers.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Divide data into categories

    Your dates were not Excel recognizable dates. Selecting column A and using Text to Columns, I converted the dates to real dates. I then added a helper column called Group and entered this formula and copied down. I then selected all the data including the helper column and Custom sorted on the Group then on the Years.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Divide data into categories

    See attached. I added the parts in Yellow. Enter the crisis date in cell O1 - the column will add a category to every line.

    Does that help?

    Formula used for new column: =CHOOSE(1+(DATE(RIGHT(A2,4),MID(A2,FIND(".",A2)+1,FIND(".",A2,FIND(".",A2)+1)-FIND(".",A2)-1),DAY(LEFT(A2,FIND(".",A2)-1)))>$O$1)*1,"Before", "After")

    --Edit--
    Text-To-Columns was a good idea. In the event he couldn't use that, I used string handling to determine the date for each line.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,921

    Re: Divide data into categories

    If your autofilter comes up like mine, it should be as easy as selecting/deselecting the desired dates in the autofilter menu for the first column.

    You may want to consider using advanced filter rather than autofilter: http://office.microsoft.com/en-us/ex...942.aspx?CTT=1

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Divide data into categories

    deleted -- ample coverage on this thread
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Registered User
    Join Date
    08-01-2014
    Location
    Helsinki, Finland
    MS-Off Ver
    2007
    Posts
    10

    Re: Divide data into categories

    Thank you a looot newdoverman and GeneralDisarray. You helped me a looot you saved me I can say. )))))))))

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Divide data into categories

    Thank you for the feedback. Glad to have helped.

+ 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 can I divide data into two categories?
    By Tamimami in forum Excel General
    Replies: 3
    Last Post: 08-01-2014, 01:49 PM
  2. Replies: 1
    Last Post: 05-15-2013, 06:55 AM
  3. copy data to new workbook & sort data into different categories if criteria match
    By natnauk16 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2013, 03:53 AM
  4. Replies: 0
    Last Post: 07-22-2011, 03:51 PM
  5. Categories and Sub-Categories in Column Charts
    By theoneness in forum Excel General
    Replies: 2
    Last Post: 11-28-2009, 10:05 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