Find position of the first number in a cell, not working?

Camel123

Board Regular
Joined
Jun 5, 2018
Messages
186
Hi,

I am trying to return the minimum value of the position of all numbers in Mi Yang 1337

=MIN(FIND(0&1&2&3&4&5&6&7&8&9;A2&"0123456789"))

Using the above function gives 13 as result. It should be 9.

What is wrong?
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this: =MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))
 
Upvote 0
this bit of VBa will do it for you
Code:
Sub test()
Valt = Cells(1, 1)
lt = Len(Valt)
 For i = 1 To lt
  ch = Asc(Mid(Valt, i, 1))
  If ch > 47 And ch < 58 Then
  MsgBox (i)
  Exit For
  End If
  
 Next i
 
End Sub
you could use this as a UDF
 
Last edited:
Upvote 0
Tried both functions and the VBA. None of the suggested solutions above worked, unfortunately :/

I believe "," in my european or scandianvian version is "&", since "," only turns out in errors.
 
Upvote 0
Hi,

Not sure about your region requirements, but try changing All commas to semicolons:

=MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&"0123456789"))

OR

=MIN(FIND({0;1;2;3;4;5;6;7;8;9},A2&1/17))
 
Upvote 0
None of the suggestions above works, only gives #VALUE ! error.

Please see link to picture
qRF8KIt
, this is how the function looks at the moment and the only one not giving error. Really frustrating...

https://imgur.com/a/qRF8KIt
 
Last edited:
Upvote 0
See your pictures....

Why you use "&" instead ";" in your formula ???

Not sure about your region requirements, but try changing All commas to semicolons:

=MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&"0123456789"))

OR

=MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&1/17))
 
Last edited:
Upvote 0
Copy the below formula. Click cell B2. Go to the formula bar and paste in the formula. Press enter. What happens?

=MIN(FIND({0,1,2,3,4,5,6,7,8,9};A2&"0123456789"))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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