SOLVED

Calculating a % based on a Y or N in a column

%3CLINGO-SUB%20id%3D%22lingo-sub-3299256%22%20slang%3D%22en-US%22%3ECalculating%20a%20%25%20based%20on%20a%20Y%20or%20N%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299256%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20an%20excel%20sheet%20to%20track%20trading%20data.%20I%20have%20one%20column%20that%20is%20to%20designate%20whether%20the%20trade%20was%20a%20win%20or%20a%20loss%2C%20so%20it%20either%20has%20a%20%22W%22%20or%20an%20%22L%22%20in%20it.%20How%20would%20I%20be%20able%20to%20create%20a%20formula%20that%20would%20give%20me%20a%20%25%20of%20Ws%20out%20of%20all%20the%20cells%20in%20the%20column%20with%20either%20a%20%22W%22%20or%20%22L%22%20in%20them%3F%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20it%20needs%20to%20be%20a%20number%2C%20I%20can%20easily%20switch%20the%20%22W%22%20to%20%221%22%20and%20%22L%22%20to%20%220%22%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20is%20greatly%20appreciated.%20I%20thought%20I%20would%20use%20a%20sumif%20formula%20but%20keep%20getting%20an%20error%20and%20can't%20seem%20to%20figure%20it%20out%2C%20although%20I%20feel%20like%20this%20would%20be%20rather%20simple.%20Thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3299256%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-3301339%22%20slang%3D%22en-US%22%3ERe%3A%20Calculating%20a%20%25%20based%20on%20a%20Y%20or%20N%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301339%22%20slang%3D%22en-US%22%3EThank%20you!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299274%22%20slang%3D%22en-US%22%3ERe%3A%20Calculating%20a%20%25%20based%20on%20a%20Y%20or%20N%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299274%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1377445%22%20target%3D%22_blank%22%3E%40LameloCall%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22_Screenshot.png%22%20style%3D%22width%3A%20164px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368171iF67300BE822B9592%2Fimage-size%2Fsmall%3Fv%3Dv2%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22_Screenshot.png%22%20alt%3D%22_Screenshot.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ein%26nbsp%3B%3CSTRONG%3EC2%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DCOUNTIF(A2%3AA10%2C%22w%22)%20%2F%20COUNTA(A2%3AA10)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3313831%22%20slang%3D%22en-US%22%3ERe%3A%20Calculating%20a%20%25%20based%20on%20a%20Y%20or%20N%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3313831%22%20slang%3D%22en-US%22%3EGlad%20I%20could%20help%3C%2FLINGO-BODY%3E
New Contributor

I am trying to create an excel sheet to track trading data. I have one column that is to designate whether the trade was a win or a loss, so it either has a "W" or an "L" in it. How would I be able to create a formula that would give me a % of Ws out of all the cells in the column with either a "W" or "L" in them?

If it needs to be a number, I can easily switch the "W" to "1" and "L" to "0"

Any help is greatly appreciated. I thought I would use a sumif formula but keep getting an error and can't seem to figure it out, although I feel like this would be rather simple. Thanks in advance.

3 Replies
best response confirmed by Sergei Baklan (MVP)
Solution

@LameloCall 

 

_Screenshot.png

in C2:

=COUNTIF(A2:A10,"w") / COUNTA(A2:A10)
Thank you!!
Glad I could help