# Excel Multiple Cells Included in an IF Formula

I am trying to compare 6 cells, and get a pass or fail at the end, but in Excel it looks like it will only let me have 5 cells. I'm not sure how to word it.

like for example:

``````Pseudocode: if (A1 and B1 and C1 = A100 and B100 and C100 then Pass else Fail)
=if(A1;B1;C1=A100;B100;C100,Pass,Fail)
``````

That doesn't work, and Excel says I typed a few errors.

Please can someone help me with this?

Updated Ok, to make this a little more clearer, here is an example of what I want to achieve:

``````A1 = 1.0.0.0
B1 = 01/01/2000
C1 = 00:30

A100 = 1.0.0.0
B100 = 01/01/2000
C100 = 00:30
``````

Therefore the cell I want the answer will be `Pass`.

But if one of those cells don't match up, then it will be a `Fail`.

-
Try using the AND keyword! – Dave Aug 20 '13 at 10:01
`=IF(AND(A1=A100,B1=B100,C1=C100),"pass","fail")` – nixda Aug 20 '13 at 10:06
More reading about AND – Dave Aug 20 '13 at 10:07
Thanks @nixda, it has worked, but is showing Pass even if the fields are all blank. – Kevdog777 Aug 20 '13 at 10:23
Please edit your post and maybe provide a data sample. It is not clear if the matches are in pairs or if any of A1, B1, C1 should be matched to any of A100, B100, C100. If `all the fields are blank` then, of course the formula will return `pass`. If that is not the result you expect, then you need to explain the input, the logic, and the expected output. – teylyn Aug 20 '13 at 10:44

Thank you for answering. I didn't like it that if the cells were empty, that it was failing, so I have blanked the "fail" out - so it would look like this: `...>0),"Pass","")` – Kevdog777 Aug 21 '13 at 9:36