Re: Wildcard character in an "If" statement?



It could get tripped up when situations like this might arise:

Looking for John:

Johnson = a match
John's = a match
Johnston = a match
Littlejohn = a match

Either formula will trip on these, David's or the one I offered.

One way to limit most of the problems is to pad the lookup value with a
space on each end. But even this will not work on these type of situations:

Looking for John:

"John"
John's
John?
John:
John!
John.

Biff

"SteveDB1" <SteveDB1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B6FC730D-149F-42BE-94CE-FDEAFFFE60AC@xxxxxxxxxxxxxxxx
David.
Thank you.
It works like a charm.
Any items that I should be aware of as for not working? Or is that too
large
an answer...?
Again... Thank you!

"David Biddulph" wrote:

I can't see the message to which you are replying, Steve, but as far as
your
question is concerned, try
=IF(ISNUMBER(SEARCH("stringname",A1)),B1*1/2,B$1*3/4) or
=IF(ISNUMBER(FIND("stringname",A1)),B1*1/2,B$1*3/4)

FIND() is case-sensitive, SEARCH() isn not.
--
David Biddulph

"SteveDB1" <SteveDB1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:44655D9E-0204-429F-8C5B-78EB45F2EB65@xxxxxxxxxxxxxxxx
I want to do what seems to be a similar IF function.
Here is my version.
=IF(a1="*stringname*",b1*1/2,b1*3/4)
My goal is to look in a cell which contains a phrase. The phrase itself
varies {the cell contents could be a name of a person, with (word)
following
it}, but the particular component that I'm seeking either shows up as
(word),
or as (word1). Eg., cell contents being within the dbl quote marks:
"Dave
Johnson (word)", or "Danny Thomas (word1)"
Where "word" could be anything.
I've tried already, and it <always> returns a false value-- b1*3/4.
1- can I do this?
2- what would I need to do in order to make it work?
I've also tried the tilda, and question mark. Neither of those are
working.
If however, I just have it look in a cell with a single character, the
equation works fine [=if(a1="c",b1*1/2,b1*3/4)]. I'd assume that it'd
work
well too if I had just a single word in the cell, as opposed to a
number
of
them. For some reason I just can't get it to work with longer elements,
where
I want to locate a single word within a string of 5 or six words.
If I'm unable to do this, what variation would I need to accomplish
this?
Thank you.








.



Relevant Pages

  • Death Row Inmate Commits Suicide on Execution Day
    ... killer Michael Dewayne Johnson ... committed suicide early today in his death-row cell less than 18 hours ... before his scheduled execution, in the first such incident in memory, prison ... Prison officials said he left no note. ...
    (alt.true-crime)
  • RE: Sort affects formula
    ... "John C" wrote: ... modify each cell in column D to match it's "opposite" ... exercises to a set) so when sorted on column B the exercises would be sorted ... Column 'C' might be the maximum weight used in each exercise. ...
    (microsoft.public.excel.newusers)
  • RE: Dropdown box display only data dependent on another dropdown b
    ... "John C" wrote: ... Click on the cell that has the drop down box for your state list. ... and then type in myState. ... I had to define two other variables, State List and County List ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Re: A question of discrete space-time, part 3
    ... John C. Polasek wrote: ... c merely declines to zero at a black hole. ... The "cell size" increasing without bound is ...
    (sci.physics.research)
  • Re: Returning multiple indices for a lookup
    ... Looking back at your post - since you have a counter set up, ... John 1234 ... James 3456 ... As a solution I am thinking to get the cell reference instead of the content, get the rows of the reference using SMALL and then use that index to get the content. ...
    (microsoft.public.excel.worksheet.functions)