countif

jasman

Board Regular
Joined
Oct 30, 2010
Messages
141
Hi. I have f4 columns with "TRUE" & "FALSE" values in them. I am tryign to do a countif at the bottom of each to see how many "TRUE" vales there are in each column. Im using formula below but it only works for one of the columns and wont count the "TRUE"s in the other ...just gives answer as 0?

=COUNTIF(O7:O122,"TRUE")
 
i think it is the fact that i have a countif formula in column O but not in the others as I put the countif formula in column N and it worked. is there anyway around this. below are the forumlas used in each column:

column n: =IF($F7=$L7,"TRUE",IF($I7=$L7,"TRUE",IF($K7=$L7,"TRUE","FALSE")))

column o: =IF(OR(COUNTIF($L7,$F7&"*"),COUNTIF($L7,$I7&"*"),COUNTIF($L7,$K7&"*")),OR(ISNUMBER(SEARCH({0,1,2,3,4,5,6},$L7))))

column p: =IF(N7="TRUE","FALSE",IF(LEFT(F7,1)=LEFT(L7,1),"FALSE",IF(LEFT(I7,1)=LEFT(L7,1),"FALSE",IF(LEFT(K7,1)=LEFT(L7,1),"FALSE",IF(LEFT(R7,1)=LEFT(L7,1),"TRUE",IF(LEFT(U7,1)=LEFT(L7,1),"TRUE","FALSE"))))))


column q: =IF(LEFT(F7,1)=LEFT(L7,1),"FALSE",IF(LEFT(I7,1)=LEFT(L7,1),"FALSE",IF(LEFT(K7,1)=LEFT(L7,1),"FALSE",IF(LEFT(R7,1)=LEFT(L7,1),"FALSE",IF(LEFT(R7,1)=LEFT(L7,1),"FALSE","TRUE")))))
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Those formulae could/should be contructed a lot more efficiently. Your formula in column N should be:
=OR($F7=$L7,$I7=$L7,$K7=$L7)

As long as your formulae returns the value TRUE or FALSE (as opposed to the string "TRUE" or "FALSE"), your COUNTIF formula will work.
 
Upvote 0
i swaitched to the formula you gave for column N and the countif works. Is this the only way to amend the formula?

thanks for help
 
Upvote 0
For columns p and q, you could try using:
=COUNTIF(P7:P122,"*TRUE")
=COUNTIF(Q7:Q122,"*TRUE")
 
Upvote 0
Those formulae could/should be contructed a lot more efficiently. Your formula in column N should be:
=OR($F7=$L7,$I7=$L7,$K7=$L7)

As long as your formulae returns the value TRUE or FALSE (as opposed to the string "TRUE" or "FALSE"), your COUNTIF formula will work.

You just need to make sure that your formulae are returning TRUE or FALSE without quotes
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top