问题
From this picture we know the data have mode 3.14 and the value 3.14 = value 3.1 , right? whereas the value 3.1 its not only 3.14 , but include 3.05, 3.06, 3.07, 3.08, 3.09, 3.10 , 3.11 , 3.12 , 3.13 , and 3.14 right ?
the question is , how to let the count of the formula may appear with the known just mode ?
or whats formula of "if" or "round", if I want to know the count from that value of 3.05, 3.06, 3.07, 3.08, 3.09, 3.10 , 3.11 , 3.12 , 3.13 , and 3.14 was selected from the range of data without having to reduce the decimal point in the data column and without typing the value?
I'm already try =COUNTIF(A2:A22,ROUND(MODE(A2:A22),1)) , but the result = 1 not 6. anybody can help me?
回答1:
=COUNTIF(A2:A22,"<="&3.14)-COUNTIF(A2:A22,"<"&3.05)
count everything equal to or below 3.14, and then subtract everything less than 3.10.
To automate the rounding process, you could go with what Dirk was suggesting and use:
=COUNTIF(A2:A22,"<"&ROUND(MODE(A2:A22),1)+0.05)-COUNTIF(A2:A22,"<"&ROUND(MODE(A2:A22),1)-0.05)
Proof of Concept
来源:https://stackoverflow.com/questions/39114225/how-to-use-countif-and-if-and-round-in-the-same-time