Excel If Statement no working

%3CLINGO-SUB%20id%3D%22lingo-sub-2840721%22%20slang%3D%22en-US%22%3EExcel%20If%20Statement%20no%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2840721%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all.%20I%20have%20this%20IF%20statement%20in%20the%20formula%20bar%26nbsp%3B%3CSTRONG%3E%3DIF(E2%3D%22male%22%2C%221%22%2C%220%22)%3C%2FSTRONG%3E.%20but%20when%20I%20press%20enter%20I%20get%20the%20%22There's%20a%20problem%20with%20this%20formula%22%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20use%20the%20IF%20statement%20to%20return%201%20when%20column%20E2%20is%20equal%20to%20male%20and%20a%200%20when%20it%20is%20a%20female%20in%20the%20column.%20See%20the%20screenshot%20below%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Tariro_0-1634108987767.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316959iCECD6875CA706DCC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Tariro_0-1634108987767.png%22%20alt%3D%22Tariro_0-1634108987767.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Microsoft%20Excel%202016%20and%20windows%2010.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20am%20I%20getting%20it%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2840721%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2842329%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Statement%20no%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2842329%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%2C%20this%20is%20what%20I%60m%20getting%20when%20I%20open%20the%20file%20-%20I%20can't%20see%20the%20formula%3F%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Doc%20preview.JPG%22%20style%3D%22width%3A%20990px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317081i719461FE47A07B24%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Doc%20preview.JPG%22%20alt%3D%22Doc%20preview.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2843221%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Statement%20no%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2843221%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1183992%22%20target%3D%22_blank%22%3E%40Tariro%3C%2FA%3E%26nbsp%3BDon't%20you%20see%20the%20formulae%20in%20column%20M%3F%20The%20results%20are%20in%20your%20screen%20shot.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2840776%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Statement%20no%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2840776%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1183992%22%20target%3D%22_blank%22%3E%40Tariro%3C%2FA%3E%26nbsp%3BHave%20look%20at%20the%20attached%20file%20and%20see%20which%20formula%20you%20want%20to%20use.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all. I have this IF statement in the formula bar =IF(E2="male","1","0"). but when I press enter I get the "There's a problem with this formula" error.

 

I want to use the IF statement to return 1 when column E2 is equal to male and a 0 when it is a female in the column. See the screenshot below:

Tariro_0-1634108987767.png

 

I am using Microsoft Excel 2016 and windows 10.

 

Where am I getting it wrong?

 

3 Replies

@Tariro Have look at the attached file and see which formula you want to use.

@Riny_van_Eekelen , this is what I`m getting when I open the file - I can't see the formula?Doc preview.JPG

@Tariro Don't you see the formulae in column M? The results are in your screen shot.