UDF
On Jun 2, 7:13 am, "Niek Otten" wrote:
Hi Glenn,
What does "not work" mean? Wrong result? #NAME error? Other error? Excel crashing?
Please be more specific; show the code of the functions, where you paste it, how you call it, value of the arguments, expected
result and what you got instead, etc.
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
"QTGlennM" wrote in ooglegroups.com...
|I found several UDF's on the internet to do what I want them to do. My
| question is none of them work and I have tried one that I know to have
| worked yesterday but not today on any of my computers, I tried
| recalculating the worksheet and everything. Any help would be greatly
| appreciated.
|
| thanks
| Glenn
|
Here is the code. I got it from the internet. It has worked for me
before. And other UDF's as well now none of them work at all.
Function ExtractElement(str, N, sepChar)
' Returns the nth element from a string,
' using a specified separator character
Dim x As Variant
x = Split(str, sepChar)
If N 0 And N - 1 <= UBound(x) Then
ExtractElement = x(N - 1)
Else
ExtractElement = ""
End If
End Function
Here is formula that I use.
=ExtractElement(A1,2,".")
Here is the Error
#NAME?
Any help would be awsome. Thanks for everything.
Glenn
|