I have a file with a list of data in it. Each cell has a name, a number, and a date, which is either in the format mm/yy, mm-yy, mm-yyyy, etc. (just the month and year, never the day) The quantity I require will never be less than five characters. Is it possible for me to extract just the number from the string?

• xx company holding - 96923432 -02-22. (number required 96923432)
• yy Company (HOLDINGS) LTD - 131002204 - 02/2023 (number required 131002204)
• ab HOLDINGS LIMITED / 115472907 / Feb-23 (number required 115472907)
Feb 16, 2023 in Others 237 views

## 1 answer to this question.

Given that you employ two separate delimiters, this is intriguing. But don't worry, you can easily use the next method to record both instances. Simply add additional delimiters between the the textbefore and textafter functions if you have any available. A sample of the equation is shown below.

=TEXTBEFORE(TEXTAFTER(A2, {"-","/"}), {"-","/"})

This should work for you then if you want to return nothing if output is less than 5.

=IF(LEN(TEXTBEFORE(TEXTAFTER(A1,{"-","/"}),{"-","/"}))>5,TEXTBEFORE(TEXTAFTER(A1,{"-","/"}),{"-","/"}),"")
• 63,420 points

## (Excel) If cell is greater than <condition> then minus <number>

The IF function to calculate B5 (amount ...READ MORE

## Excel SUMIFS() using string with greater/less than symbols

Put an = in front to let Excel know ...READ MORE

## Filter/Extract a text from excel sheet having similar values

ISNUMBER(SEARCH("Maria,",SUBSTITUTE(A1:A4,"]",",")))  shows TRUE if Maria is found and false if it would ...READ MORE

## Excel: Is it possible to reorder the data in 2 columns to match up if they have a certain number of characters / a string in common?

Try this: =LET(files,A1:A4, URLs,B1:B4, f,BYROW(files,LAMBDA(r,TEX ...READ MORE

## Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

Forget the PsychoPy complications for the time ...READ MORE

## In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

## Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE

+1 vote