Apr 06 2022 05:27 PM
I was having an issue with a column of "if" statements in my spreadsheet. I was wanting to get a total of true "if" statements for that week. Each day of the week has =IF(F6<=TIME(12,0,0),"*","") to calculate if a person is coming back to work with less than 12 hours off. If so the cell will leave a "*" indicating that you qualified for quick turnaround pay.
I used =COUNTIF($G$3:$G$9,"*") for the column but I'm not getting the correct results. That column has if statements with "*" to answer true for that individual cell. The formula is counting the "*" in each of the if statements. I need to count the "true" statements in the column not the "*" in the if statements???
Apr 06 2022 05:52 PM - edited Apr 06 2022 10:40 PM
If you want to count "true", the formula must be like that.
=COUNTIF($G$3:$G$9,"true") or
=COUNTIF($G$3:$G$9,True)
If you want to count exact "*", the formula must be like that.
=Sum(--($G$3:$G$9="*"))
Apr 06 2022 09:19 PM
Solution@Kjharris123 The asterisk is seen as a wildcard character, so everything gets counted. Use "x" rather than "*" to mark and count the qualifying entries.
Apr 07 2022 05:14 PM
Yatzeee! that worked thanks for the insight!!!!!!!@Riny_van_Eekelen
Apr 06 2022 09:19 PM
Solution@Kjharris123 The asterisk is seen as a wildcard character, so everything gets counted. Use "x" rather than "*" to mark and count the qualifying entries.