+ Reply to Thread
Results 1 to 3 of 3

searching a string of text for multiple words

  1. #1
    Registered User
    Join Date
    12-02-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    83

    searching a string of text for multiple words

    Hi there,

    its probably best I give you an example.

    A1 contains the following text

    Australia & New Zealand Banking Group Ltd Ordinary dividend on 3750 shares at 62.00 cents

    B1 contains $2,325

    in C1 I want a formula that says.....if A1 contains both Australia and 62.00 I want the result to be B1

    Your help is much appreciated.

    cheers

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: searching a string of text for multiple words

    If we assume Australia always precedes the value you can use one SEARCH

    =IF(ISNUMBER(SEARCH("Australia*62.00",A1)),B1,"")

    (the above would return B1 if say you had 262.00 in A1... if the number is always preceded by a space add a space to your string before the 62 (post *) so as to make exclusive)
    Last edited by DonkeyOte; 12-09-2009 at 04:55 AM. Reason: revised bracket wording

  3. #3
    Registered User
    Join Date
    12-02-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: searching a string of text for multiple words

    thanks for your help on this it worked perfectly

+ 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