Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default CONDITIONAL STATEMENT

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..
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default CONDITIONAL STATEMENT

On Feb 20, 6:20*pm, 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..


What kind of Formula are you referring to??
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default CONDITIONAL STATEMENT

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..

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default CONDITIONAL STATEMENT

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..

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default CONDITIONAL STATEMENT

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional if statement scott Excel Worksheet Functions 1 September 8th 08 12:36 PM
Conditional Statement lbraddock Excel Worksheet Functions 0 July 16th 07 10:16 PM
Conditional statement anamarie30 Excel Programming 1 April 11th 07 08:02 PM
Conditional If statement Dan Excel Worksheet Functions 0 March 26th 06 11:46 PM
Conditional IF statement Rick[_21_] Excel Programming 2 October 29th 03 04:52 PM


All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"