## Evaluate Function

2StarLounger
Posts: 186
Joined: 04 Oct 2017, 15:47

### Evaluate Function

Hello All

can anyone help y below isn't working.

Code: Select all

``````bb = "adeel1"
sr = Evaluate("Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9}," & bb & "),""""))")

sr1 = Evaluate("MIN(FIND({0,1,2,3,4,5,6,7,8,9}," & bb & "&""0123456789""))")``````

Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

### Re: Evaluate Function

I am not sure what you are trying to do?? , but maybe this

Code: Select all

``````sr = Evaluate("Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """),""""))")

sr1 = Evaluate("MIN(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """&""0123456789""))")``````

Take a look at this in the immediate window

Code: Select all

``````? "Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9}," & bb & "),""""))"

? "Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """),""""))"

? "MIN(FIND({0,1,2,3,4,5,6,7,8,9}," & bb & "&""0123456789""))"

? "MIN(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """&""0123456789""))"
Immediate Window.JPG

Alan

( P.S. That link to excelforum does not work for me )
You do not have the required permissions to view the files attached to this post.
Last edited by Doc.AElstein on 05 Dec 2021, 19:03, edited 2 times in total.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

2StarLounger
Posts: 186
Joined: 04 Oct 2017, 15:47

### Re: Evaluate Function

thnx you so much sir, it solved the issue, thnx

2StarLounger
Posts: 186
Joined: 04 Oct 2017, 15:47

### Re: Evaluate Function

thnx for further trouble shooing it, i don't understand immediate window repose

its still showing me blank

for

Code: Select all

``? "Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """),""""))"``
Capture.PNG
You do not have the required permissions to view the files attached to this post.

Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

### Re: Evaluate Function

You must do the immediate window after code line has passed bb = "adeel1" , or else bb is ""

Do Immediate window after run and stop - macro must fill variable bb with adeel1

Code: Select all

``````Sub test()
sr = Evaluate("Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """),""""))")

sr1 = Evaluate("MIN(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """&""0123456789""))")
Stop
End Sub
``````
You do not have the required permissions to view the files attached to this post.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

### Re: Evaluate Function

Or

Code: Select all

``````bb="adeel1"
? "Min(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},""" & bb & """),""""))"
``````
You do not have the required permissions to view the files attached to this post.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

2StarLounger
Posts: 186
Joined: 04 Oct 2017, 15:47

### Re: Evaluate Function

Ahh , thnx you so much for this for putting me on track for future as well and how to deal with evaluate function thnx sir,

Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

### Re: Evaluate Function

I am having difficulty logging in with this account just now.
You can find me at DocAElstein also