+ Reply to Thread
Results 1 to 7 of 7

Best Method to Re-Categorize Categorical Data in Excel

  1. #1
    Registered User
    Join Date
    10-11-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    4

    Best Method to Re-Categorize Categorical Data in Excel

    Hey Team,

    I am curious as to what function would be best to re-categorize Regions in an Excel Table so PowerBI (Bing Maps) will recognize it by region.

    I need to convert the following:

    If EMEA then = Europe
    If AP then = Asia
    If LAR then = South America
    If NAR then North America
    If Other then = Other

    regionname.PNG



    Any help would be appreciated!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Best Method to Re-Categorize Categorical Data in Excel

    You already have the basis of a lookup table with your series of If sentences - enter the values that you currently have in a column somewhere and against them in the next column enter what you want them to become, like this:

    EMEA ……. Europe
    AP ……….. Asia
    LAR ………. South America
    NAR ………. North America
    Other ……. Other

    Suppose you do this in columns X and Y. Then you could use a formula along these lines:

    =VLOOKUP(region,X:Y,2,0)

    where region is the cell reference for the first item that you want to change. Then you can just copy the formula down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-11-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Best Method to Re-Categorize Categorical Data in Excel

    Thank you!!!

    SO what if I have one column that collects sample data with the words A, B, and C.

    A
    B
    C

    and I want to create a second column that looks at A,B, and C and puts the actual word.

    Apple
    Banana
    Cookie

    Is this time for an "IF" function?

  4. #4
    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
    44,101

    Re: Best Method to Re-Categorize Categorical Data in Excel

    No....

    =VLOOKUP(A2,E:F,2,FALSE)

    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

  5. #5
    Registered User
    Join Date
    10-11-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Best Method to Re-Categorize Categorical Data in Excel

    Hey Glenn - for the "table_array" it looks like you can't pull from a second sheet or tab. Is this true? If so - I cannot use this. I am trying to automatically convert the A..B..C...to Apple...Banana...Cookie in a database.

  6. #6
    Registered User
    Join Date
    10-11-2019
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Best Method to Re-Categorize Categorical Data in Excel

    NEVERMIND! Thank you Glenn and Pete! I got it. You all are great. Thank you.

  7. #7
    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
    44,101

    Re: Best Method to Re-Categorize Categorical Data in Excel

    So... you found that all you needed to do was refer to the sheet & range??



    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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 categorize a big list of data in MS Excel 2010?
    By kalucharan in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-06-2016, 02:09 AM
  2. Categorical variables with data validation List
    By Arsenal1986 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-10-2015, 04:11 PM
  3. Replies: 1
    Last Post: 06-15-2014, 07:46 PM
  4. Rearranging categorical data into two columns
    By petyaall in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2013, 11:02 AM
  5. Replies: 3
    Last Post: 07-30-2012, 07:16 PM
  6. Excel 2007 : Splitting categorical data
    By Banach89 in forum Excel General
    Replies: 0
    Last Post: 06-21-2011, 05:21 AM
  7. Excel Charting: Secondary axis with categorical value
    By raj4civil in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-09-2007, 11:52 AM

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