largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
I have a UDF which basically accomplishes a lookup. To do that I use this code:
there are a bunch of cases as well.
I'm not too familiar with UDFs so I am trying to figure out how to have one that does the same thing, but if it contains a certain word. Is it possible to do this with a case format since I have found that to be the fastest (computer processing speed)? Something like...
I could probably do this with a long list of if statements, but I think that would run too slowly if I had to use it for a sheet with a lot of rows (50k+).
Thanks for any insight!
Code:
Function name(number As String)
Select Case number
Case Is = "1"
name = "BOB"
.
.
.
I'm not too familiar with UDFs so I am trying to figure out how to have one that does the same thing, but if it contains a certain word. Is it possible to do this with a case format since I have found that to be the fastest (computer processing speed)? Something like...
Code:
Function Number (Textname as string)
Select Case Textname
Case Contains = "BOB"
or
Case is = "*BOB*"
I could probably do this with a long list of if statements, but I think that would run too slowly if I had to use it for a sheet with a lot of rows (50k+).
Thanks for any insight!