PC Review


Reply
Thread Tools Rate Thread

CONDITIONAL STATEMENT

 
 
RYNNER
Guest
Posts: n/a
 
      21st Feb 2009
I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
SOMEONE HELP ME PLEASE..
THANKS IN ADVANCE..
 
Reply With Quote
 
 
 
 
CurlyDave
Guest
Posts: n/a
 
      21st Feb 2009
On Feb 20, 6:20*pm, RYNNER <RYN...@discussions.microsoft.com> wrote:
> I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
> CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
> THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
> ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
> SOMEONE HELP ME PLEASE..
> THANKS IN ADVANCE..


What kind of Formula are you referring to??
 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      21st Feb 2009
You may want to use something like

If myString like "AB*" then

'looks for anything that starts with AB

or
If myString like "*AB*" then
'looks for anything with AB in the middle.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"RYNNER" wrote:

> I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
> CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
> THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
> ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
> SOMEONE HELP ME PLEASE..
> THANKS IN ADVANCE..

 
Reply With Quote
 
slarbie
Guest
Posts: n/a
 
      21st Feb 2009
The first response will address your question programmatically. But since
you say you just want a formula, maybe this is what you're looking for.

Assuming your "ABC" or "AB" is entered in cell A1, this formula will say
"Yay" if it matches either one, and "Boo" if it doesn't:
=IF(OR(LEFT(A1,2)="AB",A1="ABC"),"Yay","Boo")

Alternatively, if all you need is a TRUE or FALSE response, the following is
even sympler:
=OR(LEFT(A1,2)="AB",A1="ABC")

Hope that helps...

"RYNNER" wrote:

> I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
> CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
> THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
> ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
> SOMEONE HELP ME PLEASE..
> THANKS IN ADVANCE..

 
Reply With Quote
 
RYNNER
Guest
Posts: n/a
 
      21st Feb 2009
sir,
my formula is =IF(A1=PMC 1234,B1+120,"",IF(A1=PLB 1234,B1+60,""))... now,
the problem is.. PMC and PLB is always followed with different numbers..
thats why i am searching for a variable, like asterisk if it can replace it..
making the formula =IF(A1=PMC*,B1+120,"",IF(A1=PLB*,B1+60,""))... but it
doesnt work..

hope u could help me.. thanks..

rynner frm philippines

"Barb Reinhardt" wrote:

> You may want to use something like
>
> If myString like "AB*" then
>
> 'looks for anything that starts with AB
>
> or
> If myString like "*AB*" then
> 'looks for anything with AB in the middle.
> --
> HTH,
> Barb Reinhardt
>
> If this post was helpful to you, please click YES below.
>
>
>
> "RYNNER" wrote:
>
> > I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
> > CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
> > THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
> > ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
> > SOMEONE HELP ME PLEASE..
> > THANKS IN ADVANCE..

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional IIF Statement Frank Microsoft Access Queries 6 13th Jan 2009 03:49 AM
Re: conditional statement; is that what i need to use? gls858 Microsoft Excel New Users 3 17th Oct 2008 10:52 PM
Using query results within Conditional Statement...sequenced conditional queries rafael.farias.jr@gmail.com Microsoft Access 3 30th Aug 2006 02:08 PM
if conditional statement Microsoft Word New Users 1 23rd Jul 2004 09:48 AM
Conditional Statement Chaster Microsoft Access Forms 0 18th Jul 2003 12:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 PM.