ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   search macro/formula help (https://www.excelbanter.com/excel-discussion-misc-queries/85697-re-search-macro-formula-help.html)

Toppers

search macro/formula help
 
Try:

A1=text string
ancekdgkhglsdkgldfgkjdflgdg7890gafgagdfg205056agad gafgafg1234567adfgdfg32adfg........
B1=Search string (1234567)

=IF(ISERROR(MID(A1,SEARCH(B1,A1),LEN(B1))),"",MID( A1,SEARCH(B1,A1),LEN(B1)))

or

=IF(ISERROR(MID(A1,SEARCH(B1,A1),LEN(B1))),"",B1)

HTH

"refresh" wrote:

Hiya,

I'm trying to find some info from a stream of data. There is a lot of info
and it varies from one line to next so I can't target set start points in the
string by using MID.

Ideally, from the following I would be able to pick out and return 1234567.

ancekdgkhglsdkgldfgkjdflgdg7890gafgagdfg205056agad gafgafg1234567adfgdfg32adfgadfg54gaadfgadga329adfg afgag654123afga

The number is arbitrary as it would be a different and unknown number in
every case. The only constant is the length and format of the string I'm
looking for. I've got 30,000+ of these strings and I'd like to know if there
is a way to pick out the number in excel or if there is something else i
should look at that might help.

I'd appreciate any assistance you can offer.

Many thanks.




Is what I'm asking possible and are there any quick ways to run this?



All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com