+ Reply to Thread
Results 1 to 2 of 2

Grouping, If X They Y, ordering data by region

  1. #1
    Registered User
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Grouping, If X They Y, ordering data by region

    I have a spreadsheet of many thousand records each about 10 fields, all records have a delivery ID in a separate column composed of one or two letters or digits. For example, the following all show the product was delivered in the midlands. (B, CV, DE, DN, DY, HR, LD, LE, LN, NG, PE).

    Territories are, Midlands, Scotland, Ireland and South East, each made up of around 10-30 of these codes.

    How do I write a function to say If "XCell" = B, CV, DE, DN, DY etc... then Y = Midlands

    Would I then need to have a separate column for each territory?

    Can I write one log bit of code which crunches all the data and gives Scotland, Ireland, Middlands etc.. as a readout. This is a the best case for me. I don't want millions of columns

    The above is assuming an If Then style way of going about this is optimal and I could see no way to do this following some basic google searches

    Any help is most appreciated.

    Best wishes

    Joe

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: Grouping, If X They Y, ordering data by region

    All you need is a table showing the correspondence between codes and a simple VLOOKUP.

    See sheet.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. Help needed! Automated grouping and re-ordering
    By un_RRL in forum Excel General
    Replies: 3
    Last Post: 11-10-2016, 08:47 PM
  2. Replies: 2
    Last Post: 06-01-2015, 06:23 PM
  3. [SOLVED] Grouping Name + Date + Number + Ordering
    By guy13 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-09-2015, 09:12 AM
  4. [SOLVED] Region grouping
    By aaaaaaiden in forum Excel General
    Replies: 2
    Last Post: 02-05-2014, 12:06 PM
  5. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  6. Replies: 4
    Last Post: 05-17-2012, 06:30 PM
  7. Replies: 1
    Last Post: 10-04-2007, 12:04 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