substring

  1. C

    Find a substring within a range and return the full string.

    Given three variables (starting row, ending row, and substring) return the full string of the first cell found in the given range that contains the substring. What formula can I use in D7 to return the string found within the given rows? Looking to be able to change the rows as needed. For...
  2. M

    Formula for a cell that contains one of two things

    I'm looking for a formula that will help me add a value to help me categorize page type. Column 1 contains url paths and I'd like column 2 to contain either "Products" or "Content". If column A contains "/collections/" or contains "/products/" it could be classified as "Products" in column B. If...
  3. D

    If Substring from a List contains Subtring, return that item from the list

    I have a column containing broken/good domains I want to compare it to a list containing all the correct domains, and return those from this list that partial matches with [Email Domain]
  4. M

    Excel IF Formula & Remove Substring

    Hello, Could someone please help me with the IF statement in column Q? The formula should be If Column J is "Y" then remove substring "HM" from column P. The formula I'm trying is also deleting everything after the substring and if the substring doesn't exist then it's giving me #VALUE...
  5. S

    VBA to extract string between 2 special characters (where spec. characters appear twice)

    I'm looking for some VBA to extract the text: 1620011017 from the below string; Inv_1620056384_1620011017_1034258 There could be any number of characters, so I think I would need to define it based on the fact it's the string between the 2 underscores. I think starting from the right of the...
  6. R

    Sub String

    Dear All, I would like to Split and assign the splited first the 100 char in one cell. then split the char from 101 to 200 then assign it next cell the splited value via vba in excel. For example: If I receive 1000 char Split 100,100 upto 1000. But the 1000 chars are not fixed. it will be...
  7. T

    Formula to extract substring between two characters

    I have a list of path names in column A and would like to extract the file names which come after the last "/" and before the last "." to be placed in column B. I also want all "%20" to be replaced with a space. For example, cell A1 contains...
  8. E

    Substring Search !

    Hello! So let's say I have: Dim MainString as string, Substring as string Dim Result as Boolean MainString ="ABCDE|ABCDF|CGHMN|QRSTU|CJKLM" Question: Is there an easier (faster) way to check whether MainString contains all elements of Substring without using loops? Example 1: If Substring...
  9. S

    VBA - Using InStr to find substring and cut characters into offset cell

    Can anyone help with an error I am getting when using the InStr function please? :confused: I want the code to identify the column with header 'To' which can occur in variable position, then search the 'To' column for a specific substring. For each cell containing the substring I need the...
  10. S

    VBA - Using InStr to find substring and cut characters into offset cell

    Can anyone help with an error I am getting when using the InStr function please? :confused: I want the code to identify the column with header 'To' which can occur in variable position, then search the 'To' column for a specific substring. For each cell containing the substring I need the...
  11. S

    Find numbers before unit of measurement in string

    Hi, I've got what seems like a simple conversion task that I'm having trouble puzzling out. I have a column of product descriptions (text/html) that contain measurements (i.e. "Medium - 6.3cm x 7cm") and I need to find and convert them from cm to inches. I'm having trouble figuring out how to...
  12. S

    Find best partial match(es) for substring(s)

    This might be an impossible task, but I'm in a de-duping project and was hoping to write a formula that could plug in a string from before the @ in an email address, say "harrystruman" and then compare that to a range of values in a column or columns, and find the best match or partial match (or...
  13. S

    VBA, Sum part of substring

    Hi, Setup: I have data in colum "B:D". In column "B" there is an item number, in column "C" there is a category of the item (always 2 digits long) and in colum "D" I have an amount for each category. Note that all values in column "C" and column "D" is in the same cell (ctrl+alt+enter). Note...
  14. S

    Find and remove list of substrings from larger list of strings

    I have three lists: > LIST 1 is a set of substrings that need to be removed from the main list - LIST 2. The substrings are either a prefix or a suffix (either the beginning or end of one of the strings in LIST 2). > LIST 2, as mentioned, is the main list that needs to have one of the...
  15. K

    INDEX MATCH Multiple Substrings

    {=IFNA(INDEX(NamedRange,MATCH(TRUE,ISNUMBER(SEARCH(NamedRange2,CellcontaingStringoftext)),0))’””)} This array is looking a up list of words that could be included anywhere in the string of text and returns the corresponding value of next column of the first identified substring, if it does not...
  16. J

    Replacing Multiple Values with Different Values

    I'm working on a project for work where I need to turn SKU numbers (just a string of numbers and characters) into a regular word. For example, if the cell contains "sahara" (full cell is jmackey-sahara-XL), I want to have a corresponding adjacent column that says "Sahara." There isn't a...
  17. A

    if cell contains substring remove the substring

    folks, I need to remove the title "Dr" from a list of names prior to publishing. Not all names have this title. I can find the substring within my specific range with pos = InStr(nm1, "Dr ") where nm1 contains a name. nm1 refers to the cell C9 on my spreadsheet. if nm1 does not contain the...
  18. C

    Using match, index to return substring

    My spreadsheet consists of: column A: single numbers or letters from 1-10 and a-j column B: first-name sp last-name. (Abe Lincoln, George Washington, etc) column f: single numbers or letters column g: return last name only. how can I combine both following formulas to yield the last name only...
  19. A

    VBA: Replace substring in a cell

    Hi In A1 to A5, there is a cell with a substring that I want to replace. I tried the below code but it doesn't work Note that in A1 to A5, there are some empty cells or with text. Thank you. Sub test () Dim p as range For Each p In Activesheet.Range("A1:A5") p.Value =...
  20. T

    Substring search in a lookup on a Pivot

    Hi, Currently have this formula that works to a point: =IFERROR(GETPIVOTDATA("Var1",Data!$K$1,"Var2",$AD18222,"Var3",I$2,"Var4",$AB18222),0) I need to be able to substring Var4 so it finds for example "VF11" VF12" etc when the cell it refers to ($AB18222 for example) has "VF1" in it. Anyone...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top