Evaluate Function

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

Evaluate Function

Post by adeel1 »

Hello All

can anyone help y below isn't working.

Adeel

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""))")
Also posted https://www.excelforum.com/newthread.ph ... thread&f=7

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

Re: Evaluate Function

Post by Doc.AElstein »

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},adeel1),""))

? "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},"adeel1"),""))



? "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},adeel1&"0123456789"))

? "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},"adeel1"&"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

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

Re: Evaluate Function

Post by adeel1 »

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

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

Re: Evaluate Function

Post by adeel1 »

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.

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

Re: Evaluate Function

Post by Doc.AElstein »

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()
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""))")
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

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

Re: Evaluate Function

Post by Doc.AElstein »

Or

Code: Select all

bb="adeel1"
? "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},"adeel1"),""))
bb adeel1.JPG
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

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

Re: Evaluate Function

Post by adeel1 »

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,

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

Re: Evaluate Function

Post by Doc.AElstein »

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

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

Re: Evaluate Function

Post by adeel1 »

thnx for link , i will go through it, much thx sir :clapping: :clapping: