please help me out with a formula.

%3CLINGO-SUB%20id%3D%22lingo-sub-3368501%22%20slang%3D%22en-US%22%3Eplease%20help%20me%20out%20with%20a%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3368501%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20taking%20an%20Excell%20class%20and%20I%20have%20the%20problem%20below%20to%20solve.%20I%20am%20currently%20using%20this%20formula%20to%20put%20in%20the%20boxes%20men%26lt%3B5'08%22%20with%20purple%20shirts%2C%20men%20%26gt%3B5'08%22%20with%20pink%20shirts.%20I%20am%20trying%20to%20add%20females%20with%20green%20shirts%20but%20I%20get%20value%20%23%20when%20I%20add%20the%20female%20formula%20to%20my%20current%20formula.%3C%2FP%3E%3CP%3E%3DIF(AND(D10%26gt%3B508%2CC10%3D%22male%22)%2C%22pink%22%2C%22purple%22)...Any%20help%20is%20appreciated....Thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuestion%20to%20solve%3A%3C%2FP%3E%3CP%3EUsing%20the%20IF(AND(function%2C%20write%20a%20formula%20beginning%20in%20cell%20F10%20(again%2C%20Jackson%2C%20S)%20that%20tests%20players%20by%20both%20height%20and%20gender%20in%20order%20to%20return%20the%20answer%20you're%20needing.%20In%20this%20case%20disregard%20the%20%22key%22%20as%20we're%20only%20dealing%20with%20two%20colors%2C%20Green%20and%20Purple.%20You%20need%20to%20test%3C%2FP%3E%3CP%3Ewhether%20or%20not%20the%20value%20in%20the%20height%20column%20is%20less%20than%20or%20equal%20to%205'8%22%20(508)%2C%20AND%20whether%20or%20not%20the%20value%20in%20the%20gender%20column%20is%20%22Male%22%20or%20%22Female.%22%3C%2FP%3E%3CP%3EThe%20objective%20is%20to%20assign%20females%205'8%22%20or%20less%20with%20a%20Green%20t-shirt%2C%20and%20males%205'8%22%20or%20less%20with%20a%20Purple%20t-shirt.%20You'll%20want%20any%20players%20who%20are%20taller%20than%205'8%22%20to%20show%20up%20as%20%22Pink%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3368501%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3368668%22%20slang%3D%22en-US%22%3ERe%3A%20please%20help%20me%20out%20with%20a%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3368668%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%20Thank%20you%20for%20your%20help.%20I%20am%20new%20to%20Excell%20and%20have%20never%20used%20it%20before%20so%20this%20is%20all%20a%20foreign%20language%20to%20me.%20I%20don't%20think%20it%20is%20as%20complex%20as%20I%20am%20making%20it%20out%20to%20be.%20I%20think%20as%20I%20use%20it%20more%20it%20will%20make%20more%20sense.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3368622%22%20slang%3D%22en-US%22%3ERe%3A%20please%20help%20me%20out%20with%20a%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3368622%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1389098%22%20target%3D%22_blank%22%3E%40mhanna807%3C%2FA%3E%26nbsp%3BI'm%20going%20to%20let%20you%20figure%20out%20the%20exact%20formula%20yourself%2C%20but%20when%20you%20read%20the%20question%20carefully%2C%20all%20players%20%26gt%3B508%20are%20pink.%20So%20you%20don't%20need%20to%20test%20for%20%26gt%3B508%20AND%20gender.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20solution%20thus%20needs%20to%20test%20for%3A%3C%2FP%3E%3CP%3Eif%20%26lt%3B%3D508%20AND%20male%2C%20then%20purple%2C%20else%20if%20%26lt%3B%3D%20508%20AND%20female%2C%20then%20green%2C%20otherwise%20pink.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20working%20formula%2C%20(but%20not%20in%20line%20with%20the%20specific%20instructions%20as%20it%20doesn't%20include%20AND)%2C%20would%20be%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(D10%26gt%3B508%2C%22pink%22%2CIF(C10%3D%22male%22%2C%22purple%22%2C%22green%22))%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eassuming%20that%20the%20gender%20will%20always%20be%20male%20or%20female%2C%20i.e.%20no%20blanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20one%20first%20checks%20the%20hight.%20Everyone%20%26gt%3B508%20gets%20pink.%20Then%20checks%20for%20either%20of%20the%20gender%20types%20(male%20or%20female)%20and%20sets%20the%20color%20for%20true%20and%20for%20false%2C%20as%20all%20of%20these%20players%20will%20be%20%26lt%3B%3D508.%20no%20need%20to%20check%20that%20again.%26nbsp%3BSo%20you%20could%20also%20check%20for%20female%20and%20swap%20the%20colors.%20Like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(D10%26gt%3B508%2C%22pink%22%2CIF(C10%3D%22female%22%2C%22green%22%2C%22purple))%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am taking an Excell class and I have the problem below to solve. I am currently using this formula to put in the boxes men<5'08" with purple shirts, men >5'08" with pink shirts. I am trying to add females with green shirts but I get value # when I add the female formula to my current formula.

=IF(AND(D10>508,C10="male"),"pink","purple")...Any help is appreciated....Thanks

 

Question to solve:

Using the IF(AND(function, write a formula beginning in cell F10 (again, Jackson, S) that tests players by both height and gender in order to return the answer you're needing. In this case disregard the "key" as we're only dealing with two colors, Green and Purple. You need to test

whether or not the value in the height column is less than or equal to 5'8" (508), AND whether or not the value in the gender column is "Male" or "Female."

The objective is to assign females 5'8" or less with a Green t-shirt, and males 5'8" or less with a Purple t-shirt. You'll want any players who are taller than 5'8" to show up as "Pink".

2 Replies

@mhanna807 I'm going to let you figure out the exact formula yourself, but when you read the question carefully, all players >508 are pink. So you don't need to test for >508 AND gender.

 

The solution thus needs to test for:

if <=508 AND male, then purple, else if <= 508 AND female, then green, otherwise pink.

 

A working formula, (but not in line with the specific instructions as it doesn't include AND), would be:

 

=IF(D10>508,"pink",IF(C10="male","purple","green"))

 

assuming that the gender will always be male or female, i.e. no blanks.

 

This one first checks the hight. Everyone >508 gets pink. Then checks for either of the gender types (male or female) and sets the color for true and for false, as all of these players will be <=508. no need to check that again. So you could also check for female and swap the colors. Like this:

 

=IF(D10>508,"pink",IF(C10="female","green","purple))

@Riny_van_Eekelen  Thank you for your help. I am new to Excell and have never used it before so this is all a foreign language to me. I don't think it is as complex as I am making it out to be. I think as I use it more it will make more sense.