ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting TRUE or FALSE (https://www.excelbanter.com/excel-worksheet-functions/198768-counting-true-false.html)

Paul Gooch

Counting TRUE or FALSE
 
In using a conditional format I am able to change the cell formats
accordingly, but if I am only using basic formats to show the correct or
wrong answer to multiple choice questions then is there any way to count what
is right or wrong to the cells returning a percent correct mark? Maybe by
counting TRUE or FALSE? The answer in the cell is only ever going to be A, B,
C or D...

Regards,

Paul

Teethless mama

Counting TRUE or FALSE
 
=COUNTIF(A:A,TRUE)
=COUNTIF(A:A,FALSE)

"Paul Gooch" wrote:

In using a conditional format I am able to change the cell formats
accordingly, but if I am only using basic formats to show the correct or
wrong answer to multiple choice questions then is there any way to count what
is right or wrong to the cells returning a percent correct mark? Maybe by
counting TRUE or FALSE? The answer in the cell is only ever going to be A, B,
C or D...

Regards,

Paul


Paul Gooch[_2_]

Counting TRUE or FALSE
 


"Teethless mama" wrote:

=COUNTIF(A:A,TRUE)
=COUNTIF(A:A,FALSE)


Thanks for the quick reply, both formula's return 0. Based on my original
question, if I am using conditional formula's to achieve the result requires
a TRUE result to display the format selected. However the values within the
cell will only ever be A, B, C or D. Is there anyway to confirm the
conditional result into an actual result.

Paul

John C[_2_]

Counting TRUE or FALSE
 
What is the conditional format you are using? In other words, are you
hardcoding each cell to Cell Value, or are you using the FORMULA is. If you
are using the formula is, I am assuming you have an answer key somewhere?
Assuming your questions are being answered in column A, rows 3 through 22,
and your answers are on a separate (possibly hidden) tab named Data, in
column A, rows 3 though 22:
=SUMPRODUCT(--(A3:A22=Data!A3:A22))
will give you the number correct, or true.
--
John C


"Paul Gooch" wrote:



"Teethless mama" wrote:

=COUNTIF(A:A,TRUE)
=COUNTIF(A:A,FALSE)


Thanks for the quick reply, both formula's return 0. Based on my original
question, if I am using conditional formula's to achieve the result requires
a TRUE result to display the format selected. However the values within the
cell will only ever be A, B, C or D. Is there anyway to confirm the
conditional result into an actual result.

Paul


T. Valko

Counting TRUE or FALSE
 
In other words, you want to count the correct/incorrect answers?

If that's the case then you need to setup a range of cells as the answer key
then you just compare the answers to the key.

Answer key in the range X1:X5 -

A
C
C
D
B

Users answers to questions in the range A1:A5 -

A
B
C
C
B

=SUMPRODUCT(--(A1:A5=X1:X5))

Result = 3 (correct answers)


--
Biff
Microsoft Excel MVP


"Paul Gooch" wrote in message
...


"Teethless mama" wrote:

=COUNTIF(A:A,TRUE)
=COUNTIF(A:A,FALSE)


Thanks for the quick reply, both formula's return 0. Based on my original
question, if I am using conditional formula's to achieve the result
requires
a TRUE result to display the format selected. However the values within
the
cell will only ever be A, B, C or D. Is there anyway to confirm the
conditional result into an actual result.

Paul




Paul Gooch[_2_]

Counting TRUE or FALSE
 


"John C" wrote:

What is the conditional format you are using? In other words, are you
hardcoding each cell to Cell Value, or are you using the FORMULA is. If you
are using the formula is, I am assuming you have an answer key somewhere?
Assuming your questions are being answered in column A, rows 3 through 22,
and your answers are on a separate (possibly hidden) tab named Data, in
column A, rows 3 though 22:
=SUMPRODUCT(--(A3:A22=Data!A3:A22))
will give you the number correct, or true.


John,

That is great thanks, I did not hard code but by doing that all worked
great, thanks ever so much...

Paul

Paul Gooch[_2_]

Counting TRUE or FALSE
 


"T. Valko" wrote:

In other words, you want to count the correct/incorrect answers?

If that's the case then you need to setup a range of cells as the answer key
then you just compare the answers to the key.

Answer key in the range X1:X5 -

A
C
C
D
B

Users answers to questions in the range A1:A5 -

A
B
C
C
B

=SUMPRODUCT(--(A1:A5=X1:X5))

Result = 3 (correct answers)


Hi,

Thanks for that, as soon as I saw reference to "hardcoding" I knew there was
no other way, but the SUMPRODUCT worked great, I've never used that before.

Thanks to all who replied...

Paul

T. Valko

Counting TRUE or FALSE
 
You're welcome!

--
Biff
Microsoft Excel MVP


"Paul Gooch" wrote in message
...


"T. Valko" wrote:

In other words, you want to count the correct/incorrect answers?

If that's the case then you need to setup a range of cells as the answer
key
then you just compare the answers to the key.

Answer key in the range X1:X5 -

A
C
C
D
B

Users answers to questions in the range A1:A5 -

A
B
C
C
B

=SUMPRODUCT(--(A1:A5=X1:X5))

Result = 3 (correct answers)


Hi,

Thanks for that, as soon as I saw reference to "hardcoding" I knew there
was
no other way, but the SUMPRODUCT worked great, I've never used that
before.

Thanks to all who replied...

Paul





All times are GMT +1. The time now is 03:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com