Wildcard Question Letters & Numbers

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,216
Office Version
  1. 2016
Hi guys,

just wondering if someone help me with this issue.

I need to differentiate between following.

Anyword/Anyword with 124521/12453544

So Anyword can be anyword normally written Properfor example.. Auto/Huber GmbH
And and with Numbers 1234/2356412 those can also be any numbers at any length the same with the letters.
So how do I need to use the wildcards to find Anyword/Anyword and 1234/12457844 both seperated by /

Code:
function Test(byval strText as string) as string
dim intPos as integer

Select Case True
Case strText Like "*[a-z]/[a-z]"
intPos=Instr(strText,"/")
case else
end select

as I need any length of letters befor and after the "/" slash I like to ask if someone knows the correct syntax for this and the same for the Numbers.

It would be much appreciated.

Many thanks.. or is it not possible?
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
See if this function does what you want...
Code:
[table="width: 500"]
[tr]
	[td]Function WordsOrNumbers(S As String) As String
  WordsOrNumbers = Choose(2 + (Not S Like "*[!0-9/]*"), "Numbers", "Words")
End Function[/td]
[/tr]
[/table]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top