Counting TRUE or FALSE

P

Paul Gooch

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
 
P

Paul Gooch

Teethless mama said:
=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
 
J

John C

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.
 
T

T. Valko

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)
 
P

Paul Gooch

John C said:
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
 
P

Paul Gooch

T. Valko said:
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

T. Valko

You're welcome!

--
Biff
Microsoft Excel MVP


Paul Gooch said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top