Non vba equivalent to ISLIKE?

merlin777

Well-known Member
Joined
Aug 29, 2009
Messages
1,397
Office Version
  1. 2007
is there a non vba equivalent to ISLIKE?

I'm trying to validate a mixed text/numeric entry against 2 critera and this might do the job.

My entry must be in the form 'POnnnnnn' where nnnnnnis between 100000 and 999999 and preceded by 'po' or 'PO'.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
is there a non vba equivalent to ISLIKE?

I'm trying to validate a mixed text/numeric entry against 2 critera and this might do the job.

My entry must be in the form 'POnnnnnn' where nnnnnnis between 100000 and 999999 and preceded by 'po' or 'PO'.
Maybe this...

=AND(LEN(A2)=8,LEFT(A2,2)="po",INT(--RIGHT(A2,6))>=100000,INT(--RIGHT(A2,6))<=999999)
 
Upvote 0
:laugh:

I kept trying to quote your reply and it wouldn't work for some reason.

Then I exited the thread to see that you deleted the post! :biggrin:
 
Upvote 0
Po1.00E5 passes ...
Argh!

I tested a bunch of "E" numbers but not that one!

Lightly tested:

=AND(LEN(A2)=8,LEFT(A2,2)="po",COUNT(-MID(A2,ROW(INDIRECT("2:8")),1))=6,--RIGHT(A2,6)>=100000,--RIGHT(A2,6)<=999999)
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,681
Members
452,937
Latest member
Bhg1984

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