简体   繁体   English

EXCEL - 如何在列中仅生成“F”或“M”数据,并计算数量

[英]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.

相关问题 Excel:仅计算列 - Excel : calculate a column only 如何在Excel中计算列数据的固定平均值? - How to calculate a stationary average of column data in Excel? 如何根据excel中的周末(星期六和星期日)计算列中的值? - How to calculate values in a column based on only weekends ( saturday and sunday) in excel? 使用Excel Macro一次复制一列(M)中多个单元格中的数据时如何使Change事件和数据验证有效 - How to make Change event and data validation work when copying data in multiple cells in a column(M) at a time using Excel Macro 如何根据excel中特定列的结果计算结果和绘图数据? - How to calculate results and plot data depending on results of a specific column in excel? Excel 2010如何仅在不同列中有指定数字的情况下才能计算列中数字的百分比 - Excel 2010 how can I calculate percentile of numbers in a column only if there is a specified number in a different column 计算如何最便宜地在Excel中获得一定数量的积分 - calculate how to cheapest get a certain amount of points in Excel 如何在 SAS 中导出这些列 E 和 F(excel)? - How to derive these column E and F(excel) in SAS? 如何根据Excel中另一列的数据计算一列的总和? - How can I calculate the sum of one column based off of the data from another column in Excel? 如何下载大数据量的excel文件? - How to download excel file with large amount of data?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM