[英]EXCEL - HOW TO MAKE DATA ONLY 'F' or 'M' in column, and calculate amount
Here is my spreadsheet:这是我的电子表格:
https://snag.gy/8gAoPj.jpg https://snag.gy/8gAoPj.jpg
how do i make it so that data entered in the gender column can only be M or F and then create a button that calculates the amount of Males and Females?我如何才能使性别列中输入的数据只能是 M 或 F,然后创建一个计算男性和女性数量的按钮?
Select Column E (entirely)
Menu Data-->Data Validation-->Settings Tab -->
Allow: List
Source: M,F
You'll get a combobox at each cell of row E. To get the number of Males, type this formula in any cell of the worksheet:您将在 E 行的每个单元格处获得一个组合框。要获取男性人数,请在工作表的任何单元格中键入以下公式:
=COUNTIF(E:E, "M")
Similarly for F emales.女性也是如此。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.