+ Reply to Thread
Results 1 to 8 of 8

Grouping one column into categories

  1. #1
    Registered User
    Join Date
    10-15-2013
    Location
    Stirling, Scotland
    MS-Off Ver
    Excel 2013
    Posts
    4

    Grouping one column into categories

    Hi there, I have a large column of postcodes listed and I am trying to group these into 6 Territories (T1 - T6 in another column). Is it possible to do this and for excel to remember these groups if the same postcodes come in the next month?

    So to sum up the postcodes refer to a quantity despatched to that postcode and the postcodes go into 1 of 6 territories. I am trying to group the quantity sold in each territory.

    Is this possible. I feel like I should know how to do this but it's just not working!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Grouping one column into categories

    Hi,

    Do you have a definitive list of which postcodes go in which Territory?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    10-15-2013
    Location
    Stirling, Scotland
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Grouping one column into categories

    It's over 7000 postcodes and I would need to add any extra ones in if there are more added in further months. All UK postcodes would probably be best, or I could list postcodes by the first 2 letters of the postcode.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Grouping one column into categories

    No, but what I mean is: are these Territories already defined?

    So that what you want to do is, given a particular postcode, say, to be able to have Excel automatically tell you which Territory that postcode belongs to?

    This is perfectly possible, but it requires you to have that definitive list of Post Codes/Territories in the first place.

    Regards

  5. #5
    Registered User
    Join Date
    10-15-2013
    Location
    Stirling, Scotland
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Grouping one column into categories

    I'm in the process of doing this now. So for example the list of postcodes is in column C and the territories are in column G.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Grouping one column into categories

    Then one possible solution would be to use a VLOOKUP.

    For example, supposing you had a postcode in Sheet1 cell A1 for which you wished to know the Territory. Suppose also that your list of postcodes and Territories is in Sheet2, beginning in row 2 and ending in row 7000 with, as you said, postcodes in column C and Territories in column G. Then you would enter this formula (in e.g. Sheet1 B1):

    =VLOOKUP(A1,Sheet2!$C$2:$G$7000,5,0)

    You could make this end range reference (7000) arbitrarily larger so that, if and when you add further records, they will be included in the search, without any negative effects.

    Regards

  7. #7
    Registered User
    Join Date
    10-15-2013
    Location
    Stirling, Scotland
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Grouping one column into categories

    I'm not sure I understand.
    Is there a way I could have a sheet of the different postcode groups e.g. the first 2 letters of the postcode and in the next column the territory that belongs to for example column a being territories tells you that the following are in T1 and column b lists the postcode areas, e.g. ab, bt, ca etc.

    So that when I paste the postcodes into another sheet along with other info excel can tell by the first 2 letters in the postcode which territory they belong to and can give me that info in another column.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Grouping one column into categories

    But that's exactly what you'd do with that formula I posted.

    Once you have one formula (in e.g. cell B1) which refers to e.g. the postcode in cell A1, and tells you what territory it is (by searching in the table you've created), all you then do is copy/drag that formula down (to cell B2, B3, etc.) so that it will automatically give you the territories for the postcodes in cells A2, A3, etc.

    If you're still not clear, all I can suggest is that you post a couple of sample workbooks: one being the table you're creating which lists all the territories and their respective postcodes (remove or 'dummy' any sensitive/confidential information in there if you need to), the other an example of the 'results' sheet you'd like to have where, for example, you type in a postcode and it tells you automatically to which territory it belongs.

    Regards

+ 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. Replies: 1
    Last Post: 05-15-2013, 06:55 AM
  2. Replies: 1
    Last Post: 12-15-2012, 02:39 PM
  3. [SOLVED] Pie Chart not grouping categories together
    By rushdenx1 in forum Excel General
    Replies: 1
    Last Post: 04-03-2012, 08:41 AM
  4. Grouping categories within categories
    By mju4t in forum Excel General
    Replies: 1
    Last Post: 11-03-2010, 02:41 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