Posted to microsoft.public.excel.misc
|
|
Does Excel have an operator similar to LIKE?
What problems did you have with my solution? Whatever the problem we can fix
it?
--
Wag more, bark less
"19nigel91" wrote:
These are location codes. They range from CA-AFG-CJO-S1-0001 TO
CA-AFG-2-0001. The formula is effective but a bit rough. I NEED to maintain
the CA-AFG-CJO-S and also the CA-AFG-2. I need to maintain everything before
the -0001.
"nr" wrote:
On May 25, 5:01 am, 19nigel91
wrote:
=IF((LEFT(A25,10)="CA-AFG-CJO"),LEFT(A25,12),IF((LEFT(A25,9)="CA-AFG-2-"),LEFT(A25,8),IF((LEFT(A25,9)="CA-AFG-EK"),(LEFT(A25,11)),IF((LEFT(A25,9)="CA-AFG-3-"),LEFT(A25,8),IF((LEFT(A25,10)="CA-AFG-3AX"),LEFT(A25,10),IF((LEFT(A25,9))<"CA-AFG-2-",LEFT(A25,9),""))))))
This is the formula I am trying to streamline, instead of having to
reference the seperate locations, I wanted to do something to the tune of
="CA-AFG-??-".
"Max" wrote:
"19nigel91" wrote:
I am attempting to streamline an IF statement.
Is there an operator or argument that performs as LIKE?
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
Are you trying to test for the first seven characters to be "CA-
AFG-"? If so, you could use the LEFT function. Or, are you
interested in what follows the "AFG-" characters? If this is the
case, then you might create a cell value equal to that part of the
value, then use that cell's value in your IF statement.
If you provide more specific details, I'll try to help.
|