Filter for 225 or 233 numbers

  • Thread starter Thread starter hoganc
  • Start date Start date
H

hoganc

Hi again,

just like to say thanks for all your help, really appreciated.

I think I may have got it working by putting a 5 in the code

ie =OR(MID(A1,5,3)="233",MID(A1,5,3)="225")

instead of ==OR(MID(A1,4,3)="233",MID(A1,4,3)="225

and the same for your one frank but does this mean that it counts fro
the left ?

sometimes the no.s come in like this

92254898
or
792335698
?
 
Hi

yes, the MID function counts from the left

so you might like to try this one instead
=OR(LEFT(RIGHT(A3,7),3)="225",LEFT(RIGHT(A3,7),3)="233")

Cheers
JulieD
 
Hi!

The SEARCH worksheet function will look through a string and tell yo
if your chosen substring is anywhere in there by giving you it
starting point. If your chosen substring isn't there, it returns a
error message.

So you could use =if(search("225",A1)>0,1)

This will put a 1 alongside the entries containing 225 and #VALUE
alongside the rest. You can add error trapping to remove the erro
messages.

You could also combine it with a similar test for 233 but it gets mess
doing both at the same time because of the error bit.


Do you want to pursue this
 
Alf,

I think the OP wants 225 or 233 in specific positions in the number. He
wrote
the no.s i am looking for all contain 225 or 233 and have four no.s
which follow that also change.

I took this to mean the 5th through the 7th digits, from the right.
 
Hi Earl:

Thanks: I mis-read OP's second post as relaxing the rule, whereas i
only changed the range of lengths.

Al
 
Back
Top