# Finding a specific number in a string

#### atius

##### New Member
Hi

After quite some googling I have been unable to find an answer and turn to you.

I have a lot of random strings each with one to fifteen numbers looking like this:

1,4,6,7,9,11,15
3,6,9
2,6,12,13,14

The string very in numbers in a string.

I am trying to extract each number to a new column and trying to find a solution where I could read the string and i.e. return a false or true if a specific number is in the string. The main problem I have been having is: If I search for 1 it turns up true because of 11, 12, 13, 14 and 15; just like searching for 2 turns up true for 2 and twelve.

I hope you can help me, preferably with a formula since I don't know macros, but I won't turn my back on any viable solution.

Thx :D

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
atius,

Welcome to MrExcel.

This does not extract each number to a different cell although we can do that if it is necessary.
It does however give you a True/False in C if number in B is in your string.

Excel 2007
ABC
11,4,6,7,11,151TRUE
21,4,6,7,11,1612FALSE
31,4,6,7,11,1711TRUE
Sheet1
Cell Formulas
RangeFormula
C1=ISNUMBER(FIND(","&B1&",",","&A1&","))

Hope that helps.

Brillant, thank you
I can work with this :D

This forum usually has the answers I am looking for.

Replies
1
Views
318
Replies
8
Views
244
Replies
1
Views
261
Replies
1
Views
161
Replies
2
Views
169

1,203,600
Messages
6,056,204
Members
444,850
Latest member
dancasta7

### 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.

### Which adblocker are you using?

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

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