IF statement help

mr. j

New Member
Joined
Mar 15, 2003
Messages
32
Office Version
  1. 365
I have one column A1-A4 which will have true or false text in them and I would like to be able to have A5 to say correct or incorrect based on the text in A1-A4:

A1- False
A2- False
A3- False
A4- False
A5- "Correct" if all the answers of A1-A4 are the same or "Incorrect" if the answers in A1-A4 are different.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

=IF(OR(COUNTIF(A1:A4,FALSE)=4,COUNTIF(A1:A4,TRUE)=4),"Correct","Incorrect")
 
Upvote 0
Well done Vog!

That was some good thinking. I was going to suggest to substitute the "False" with "" or zero, and if "True" with some value and take it from there with a Sum function for the range in question. By doing that you are not limited to only four rows of data, but could expand on it if needed. ;)
 
Upvote 0
I have one column A1-A4 which will have true or false text in them and I would like to be able to have A5 to say correct or incorrect based on the text in A1-A4:

A1- False
A2- False
A3- False
A4- False
A5- "Correct" if all the answers of A1-A4 are the same or "Incorrect" if the answers in A1-A4 are different.
Assuming that the range will contain only either TRUE or FALSE...

Try this...

=IF(COUNTIF(A1:A4,A1)<4,"Incorrect","Correct")

Note that if ALL the cells in the range are empty the formula will return Incorrect.
 
Upvote 0
Assuming that the range will contain only either TRUE or FALSE...

Try this...

=IF(COUNTIF(A1:A4,A1)<4,"Incorrect","Correct")

Note that if ALL the cells in the range are empty the formula will return Incorrect.


T. Valko is it possible to have it say no data if any of the cells are blank?
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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