# Using the Split function with another function incorporated is not working correctly

1. ## Using the Split function with another function incorporated is not working correctly

Dear all, I've found and amended a small procedure called "SplitDemo" to search a string held in a cell to find a 3 digit code in that string - which works. I've tried improving it using a function called "ISLIKE" from a John Walkenback book (Excel 2010 Formulas p687) but it doesn't work. The line that seems to be causing the problem is below in the code 6 lines from the bottom. Can anyone help? I've attached a sample file, thanks, Neil

``Please Login or Register  to view this content.``

2. ## Re: Using the Split function with another function incorporated is not working correctly

It works for me .... returning ............AND ,126

3. ## Re: Using the Split function with another function incorporated is not working correctly

Yes, but according to the example the 3 # mean that the match should be a digit 0-9 so it shouldn't match against "AND".....?

4. ## Re: Using the Split function with another function incorporated is not working correctly

highlystrung,

Does this need to be VBA? This formula should do the trick
``Please Login or Register  to view this content.``

5. ## Re: Using the Split function with another function incorporated is not working correctly

Change the line
If Len(x(i)) = 3 Then
to
If Len(x(i)) = 3 And IsNumeric(x(i)) Then

6. ## Re: Using the Split function with another function incorporated is not working correctly

Thanks Andy for the coding input - it works well. Don't know why the ISLIKE procedure isn't working but then....

thanks also to tigervator for your Lookup equation. I haven't tried it as I'm doing this all in code - I seem to work in code more than using formula in the spreadsheet ... why I don't know, maybe it's a reflection of how I've learnt EXCEL.. But it's important to say I just don't know how you work out these complex formula, they seem mind blowingly complex but maybe you have a way to do it!?!

regards, Neil

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1