+ Reply to Thread
Results 1 to 8 of 8

Categorize the words using macros

  1. #1
    Forum Contributor
    Join Date
    01-07-2014
    Location
    chennai,india
    MS-Off Ver
    Excel 2007
    Posts
    105

    Categorize the words using macros

    Dear friends

    I have listed of words in column A for which i need to put certain code in column B.

    If Coulmn A contains words listed in coulmn E then put the category code listed in D to column B


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor lancer102rus's Avatar
    Join Date
    04-02-2014
    Location
    Ufa
    MS-Off Ver
    Excel 2010, 2013
    Posts
    252

    Re: Categorize the words using macros

    Like this?

    sample2.xlsx

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Categorize the words using macros

    In B2 Cell

    =INDEX($E$2:$E$10,MATCH("*"&TRIM(A2)&"*",$F$2:$F$10,0))

    Or

    =LOOKUP(2,1/SEARCH(TRIM(A2),$F$2:$F$10),$E$2:$E$10)

    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Contributor
    Join Date
    01-07-2014
    Location
    chennai,india
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Categorize the words using macros

    yes lancer....but Column A may also contain some words attached to it not just salad or soup it may contain veg soup and still i want the category code to be displayed

    Thanks

  5. #5
    Forum Contributor
    Join Date
    01-07-2014
    Location
    chennai,india
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Categorize the words using macros

    Hi sixthsense

    When i tried this formula it shows N/A

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Categorize the words using macros

    Quote Originally Posted by Latha Mani View Post
    When i tried this formula it shows N/A
    No, it will not result #N/A for all the cases, only for the cases where there is no equivalent match

  7. #7
    Forum Contributor lancer102rus's Avatar
    Join Date
    04-02-2014
    Location
    Ufa
    MS-Off Ver
    Excel 2010, 2013
    Posts
    252

    Re: Categorize the words using macros

    Quote Originally Posted by Latha Mani View Post
    yes lancer....but Column A may also contain some words attached to it not just salad or soup it may contain veg soup and still i want the category code to be displayed

    Thanks
    There is no such formula. You can solve this only by macros.
    But i think that the easiest way is to fill Column E with all variants of food
    Last edited by lancer102rus; 05-07-2014 at 06:39 AM.

  8. #8
    Forum Contributor
    Join Date
    01-07-2014
    Location
    chennai,india
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Categorize the words using macros

    Yes i need macro to do this..

+ 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. [SOLVED] keyword search - a macros to change font color for specific key words (not entire cell)
    By kingwhopper in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-10-2014, 12:25 PM
  2. Replies: 3
    Last Post: 07-30-2012, 07:16 PM
  3. categorize
    By shane.kelly in forum Excel General
    Replies: 2
    Last Post: 04-02-2012, 01:33 PM
  4. Search more than 6 words and write by using Macros
    By canada123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2010, 05:13 PM
  5. Excel 2007 : categorize by month
    By rds207 in forum Excel General
    Replies: 5
    Last Post: 08-04-2009, 04:58 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