+ Reply to Thread
Results 1 to 4 of 4

Categorize items based on free text

  1. #1
    Registered User
    Join Date
    12-03-2019
    Location
    London
    MS-Off Ver
    365
    Posts
    4

    Categorize items based on free text

    Hi,
    Can we categorize items based on free text using Excel?
    I have attached the picture which shows example of what I need to build.
    The formula should:
    Read the free text, find key words in the category table then categorize the item.
    In case of having more that one match, it should pick the category that have more matches.
    In case of having same number of match, it should pick up the category based on the MAX. historical records in the categorized items.
    The list of key words will be maintained in separate sheet. This is just an example.

    Appreciate your help.
    Attached Files Attached Files
    Last edited by amohannadi; 04-27-2021 at 10:55 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,188

    Re: Categorize items based on free text

    Please read the yellow banner at the top of this page on how to attach a file.

  3. #3
    Registered User
    Join Date
    12-03-2019
    Location
    London
    MS-Off Ver
    365
    Posts
    4

    Re: Categorize items based on free text

    Quote Originally Posted by JohnTopley View Post
    Please read the yellow banner at the top of this page on how to attach a file.
    Thank you, I have attached the file

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

    Re: Categorize items based on free text

    Not elegant, however the following returns the desired results.
    F3:W4 are populated by copy/pasting transpose the table from the Cat. sheet.
    Formula for F5:W9 =IFERROR(SEARCH(F$4,$C5),"")
    X3:AA3 are populated with the four categories.
    Formula for X5:AA9 =SUMPRODUCT(($F5:$W5<>"")*($F$3:$W$3=X$3))
    Formula for D5:D9 =IF(AND(MAX(X5:AA5)=1,X5=1),X$3,INDEX(X$3:AA$3,AGGREGATE(14,6,(COLUMN(X5:AA5)-COLUMN(W5))/(X5:AA5=MAX(X5:AA5)),1)))
    Note that F5:AA9 may be moved and/or hidden for aesthetic purposes.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Categorize items by status of completed, open
    By michael35 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 01-23-2019, 10:43 AM
  2. [SOLVED] VBA to categorize text with comma, semicolon and bracket
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-23-2015, 10:53 PM
  3. Replies: 3
    Last Post: 01-29-2012, 07:22 PM
  4. To categorize horizontal column based on value
    By san000 in forum Excel General
    Replies: 1
    Last Post: 07-30-2009, 08:22 AM
  5. Categorize Products based on IF/THEN conditions
    By gandl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2008, 03:52 AM
  6. Need a solution to categorize financial text
    By metropoj in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-21-2007, 02:50 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