+ Reply to Thread
Results 1 to 3 of 3

Formula to identify text within a cell

  1. #1
    Registered User
    Join Date
    07-05-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    74

    Formula to identify text within a cell

    I have a list fo file paths in column A, eg:
    • /may to october/latest news/parents and carers - january 2012 update?dm_i=LQE,OQTK,39545,1ZWGX,1
    • /may to october/centre vacancies/admin officer?pSourceVersionId=-

    I would like to create a table showing how many entries in the list contain certain elements of the file path - for example how many cells contain '/latest news/' and how many contain '/centre vacancies/'.

    I was trying to run an IF statement saying 'if cell A2 contains 'centre vacancies' then put the phrase 'centre vacancies' in cell B2' and was then just going to create a pivot table. But my VBA is a bit rusty...

    Please note - it's important to include the '/'s when looking up the text within the cell because (unfortunately) the text may appear in another part of the file path - i.e.
    • /may to october/centre vacancies/centre vacancies admin officer?pSourceVersionId=-

    Any help woudl be great - thanks.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Formula to identify text within a cell

    Just use a formula, no VBA needed

    =IF(ISNUMBER(FIND("/latest news/",A2)),"latest news","")

  3. #3
    Registered User
    Join Date
    07-05-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Formula to identify text within a cell

    Thanks Problem solved

+ 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