please helpp.

P

pierre

some help please.

i reached to the following :

=CHOOSE(MATCH("X";F7;0);5) which means if cell f7 has x
give me exactly 5

=CHOOSE(MATCH("y";F8;0);6) which means if cell f8 has y
give me exactly 6

MY QUESTION NOW.....IS IT POSSIBLE TO COMBINE THOSE TWO FORMULAS IN JUST
ONE ??? . ( I WANT IT SIMILAR TO [ IF(AND( ] FUNCTION )
 
P

pierre

I MEAN THAT I WOULD LIKE TO KEEP USING : CHOOSE AND MATCH TOGETHER
SO MY GOAL IS TO COMBINE THOSE TWO FORMULAS IN ONE
 
L

Lars-Åke Aspelin

some help please.

i reached to the following :

=CHOOSE(MATCH("X";F7;0);5) which means if cell f7 has x
give me exactly 5

=CHOOSE(MATCH("y";F8;0);6) which means if cell f8 has y
give me exactly 6

MY QUESTION NOW.....IS IT POSSIBLE TO COMBINE THOSE TWO FORMULAS IN JUST
ONE ??? . ( I WANT IT SIMILAR TO [ IF(AND( ] FUNCTION )

And what do you expect to get if both cell F7 has x and cell f8 has y?
5, 6, 11 or something else?

Lars-Åke
 
R

Rick Rothstein \(MVP - VB\)

Note: My system uses the comma, not the semi-colon, for a function's
argument delimiter.

I don't understand why you are using the CHOOSE function in your formulas...
there is only **one** item being chosen in each of them? I don't see why you
are not using a simple IF function to do this...

=IF(F7="x",5)

although you should probably provide a result for the false condition. If
you are insistent on using MATCH (although I can't see why), you could have
used...

=5*MATCH("x",F7,0)

for your first formula and...

=6*MATCH("y",F8,0)

for your second one. As for your request to combine them, Lars-Ã…ke has asked
the correct question... what if F7 contains "x" and F8 contains "y"? Or did
you have something different in mind when you asked your question?

Rick
 
M

MyVeryOwnSelf

i reached to the following :
=CHOOSE(MATCH("X";F7;0);5) which means if cell f7 has x
give me exactly 5

=CHOOSE(MATCH("y";F8;0);6) which means if cell f8 has y
give me exactly 6

MY QUESTION NOW.....IS IT POSSIBLE TO COMBINE THOSE TWO FORMULAS IN
JUST ONE ??? . ...

One way to test for two conditions is suggested by this:
=CHOOSE(condition1+2*condition2+1, neither, 1_only, 2_only, both)

In your case, perhaps this would help:
=CHOOSE((F7="X")+2*(F8="Y")+1, "neither", 5, 6, "both")
Since you didn't specify the result for "neither" or "both" I left them as
text strings you can replace.
 
P

pierre

dear sir...thanks for your reply...
but i would like to know the meaning of the formula you sent me :

=CHOOSE(condition1+2*condition2+1, neither, 1_only, 2_only, both)

....and in particular : 2*condition2+1

thanks in advance
 
M

MyVeryOwnSelf

but i would like to know the meaning of the formula you sent me :
=CHOOSE(condition1+2*condition2+1, neither, 1_only, 2_only, both)

...and in particular : 2*condition2+1

There are 4 possibilities:
1. condition1 and condition2 both FALSE
2. condition1 TRUE and condition2 FALSE
3. condition1 FALSE and condition2 TRUE
4. condition1 and condition2 both TRUE

Take a look at
condition1 + 2*condition2 + 1
Bearing in mind that FALSE=0 and TRUE=1 in this context, the four
possibilities evaluate to the numbers 1,2,3,4. This is just what's useful
as the first argument of CHOOSE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top