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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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