Results 1 to 4 of 4

Thread: Find function

  1. #1
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    387
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Find function

    I want a formula using the FIND function to locate the letters 'PG' within a text. Is this doable?

    For instance: BUILDING PGX 2
    HILL PGX 1
    AIRPLANE PGY 1
    STREET
    ROOM PGR III

  2. #2
    Star Lounger
    Join Date
    Oct 2012
    Posts
    55
    Thanks
    1
    Thanked 10 Times in 10 Posts
    Hi 3 Star Lounger

    You can use the SEARCH function, try: =SEARCH("PG*",A1)

    That's assuming your data is in A1.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    989
    Thanks
    56
    Thanked 105 Times in 90 Posts

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    If you want the search to be case sensitive, use FIND; if not, use SEARCH (no need for the * wildcard ). Both return the position of the match. If you just want to test if the letters are there, wrap it in an ISNUMBER check:

    =ISNUMBER(SEARCH("PG",A2))
    for example
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •