+ Reply to Thread
Results 1 to 8 of 8

Need to chck if a keyword is present in a text string and return keyword if yes

Hybrid View

Jekaterina Need to chck if a keyword is... 12-16-2012, 04:10 PM
FDibbins Re: Need to chck if a keyword... 12-16-2012, 04:38 PM
Ghozi Alkatiri Re: Need to chck if a keyword... 12-16-2012, 04:40 PM
Pete_UK Re: Need to chck if a keyword... 12-16-2012, 04:44 PM
Jekaterina Re: Need to chck if a keyword... 12-16-2012, 05:25 PM
FDibbins Re: Need to chck if a keyword... 12-16-2012, 04:44 PM
xladept Re: Need to chck if a keyword... 12-16-2012, 04:49 PM
dredwolf Re: Need to chck if a keyword... 12-16-2012, 05:55 PM
  1. #1
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Need to chck if a keyword is present in a text string and return keyword if yes

    Put this array* formula in B2:

    =IF(MAX(IF(ISNUMBER(SEARCH(E$2:E$6,A2)),ROW(E$2:E$6)))=0,"",INDEX(E:E,MAX(IF(ISNUMBER(SEARCH(E$2:E$6,A2)),ROW(E$2:E$6))))) & IF(MAX(IF(ISNUMBER(SEARCH(F$2:F$6,A2)),ROW(F$2:F$6)))=0,"",INDEX(F:F,MAX(IF(ISNUMBER(SEARCH(F$2:F$6,A2)),ROW(F$2:F$6)))))

    then copy down.

    *An array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) instead of the usual Enter.

    Hope this helps.

    Pete

    EDIT: Sorry, you won't be able to use the full-column references in the arry formula as you have XL2003 - try this one instead:

    =IF(MAX(IF(ISNUMBER(SEARCH(E$2:E$6,A2)),ROW(E$2:E$6)))=0,"",INDEX(E$1:E$6,MAX(IF(ISNUMBER(SEARCH(E$2:E$6,A2)),ROW(E$2:E$6))))) & IF(MAX(IF(ISNUMBER(SEARCH(F$2:F$6,A2)),ROW(F$2:F$6)))=0,"",INDEX(F$1:F$6,MAX(IF(ISNUMBER(SEARCH(F$2:F$6,A2)),ROW(F$2:F$6)))))

    Still committed with CSE.

    File attached to demonstrate.

    Pete
    Attached Files Attached Files
    Last edited by Pete_UK; 12-16-2012 at 04:52 PM.

  2. #2
    Registered User
    Join Date
    12-15-2012
    Location
    Latvia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Need to chck if a keyword is present in a text string and return keyword if yes

    Thanks Pete! It is just brilliant!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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