+ Reply to Thread
Results 1 to 6 of 6

Help with formula to find index of part of a string from an array

  1. #1
    Registered User
    Join Date
    11-11-2021
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    52

    Help with formula to find index of part of a string from an array

    Hi
    I need help to find a formula for the following:
    1. I have a string 4-75MM which needs to be replaced as 4.75mm - I am currently using the formula =REPLACE(REPLACE("4-75MM",FIND("-","4-75MM",1),1,"."),FIND("MM","4-75MM",1),2,"mm") to do this but a better solutions is welcome
    2. Most importantly what i want is to then find the index of this resultant string "4.75mm" in an array.
    I have attached an example xl which explains this better.

    Regards
    docGee
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: Help with formula to find index of part of a string from an array

    Please Login or Register  to view this content.
    will tell you if there is a dash in the second position of any string in col A.
    Please Login or Register  to view this content.
    will give you the row (index) number.

    Combining #1 & #2:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    11-11-2021
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    52

    Re: Help with formula to find index of part of a string from an array

    Hi protonLeah
    What i want is to find which position (index) in the array of A:A is "4.25mm - ...."?

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,241

    Re: Help with formula to find index of part of a string from an array

    Try this (I get 13)

    =MATCH(TRUE,ISNUMBER(SEARCH("4.75mm",A1:A19)),0)

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Help with formula to find index of part of a string from an array

    Maybe:

    =MATCH(SUBSTITUTE(B20,"-",".")&"*",A:A,0)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Registered User
    Join Date
    11-11-2021
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    52

    Re: Help with formula to find index of part of a string from an array

    Thanks Glenn. That works.

+ 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] Formula - Find if any part of string matches an array of words
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2018, 07:51 AM
  2. [SOLVED] Lookup formula to find part of a text string
    By A440 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-30-2015, 08:21 AM
  3. VBA Find Partial String in String Array and Output the Found String Array Value
    By scherich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2014, 11:20 AM
  4. How to find the element which contains part of a string in an array
    By lgjmac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2013, 04:45 PM
  5. [SOLVED] Formula to find the part of string.
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-20-2012, 10:38 AM
  6. search for a part of string within an array of strings from another array list
    By jdonohue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2011, 01:32 PM
  7. array formula - ignore part of string
    By jonijay78 in forum Excel General
    Replies: 5
    Last Post: 08-03-2010, 12:50 AM

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